Skip to content

Commit b1a5076

Browse files
author
Sjoerd Tieleman
committed
Build for release 0.3.6
1 parent df0797c commit b1a5076

File tree

4 files changed

+23
-11
lines changed

4 files changed

+23
-11
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## codem-isoboxer 0.3.6 (2018/08/14) ##
2+
3+
* Support for emsg box version 1 (@jeoliva)
4+
15
## codem-isoboxer 0.3.5 (2017/11/20) ##
26

37
* Performance improvement in data reading/writing (@nicosang)

dist/iso_boxer.js

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! codem-isoboxer v0.3.5 https://github.com/madebyhiro/codem-isoboxer/blob/master/LICENSE.txt */
1+
/*! codem-isoboxer v0.3.6 https://github.com/madebyhiro/codem-isoboxer/blob/master/LICENSE.txt */
22
var ISOBoxer = {};
33

44
ISOBoxer.parseBuffer = function(arrayBuffer) {
@@ -812,15 +812,23 @@ ISOBox.prototype._boxProcessors['elst'] = function() {
812812
// ISO/IEC 23009-1:2014 - 5.10.3.3 Event Message Box
813813
ISOBox.prototype._boxProcessors['emsg'] = function() {
814814
this._procFullBox();
815-
this._procField('scheme_id_uri', 'string', -1);
816-
this._procField('value', 'string', -1);
817-
this._procField('timescale', 'uint', 32);
818-
this._procField('presentation_time_delta', 'uint', 32);
819-
this._procField('event_duration', 'uint', 32);
820-
this._procField('id', 'uint', 32);
815+
if (this.version == 1) {
816+
this._procField('timescale', 'uint', 32);
817+
this._procField('presentation_time', 'uint', 64);
818+
this._procField('event_duration', 'uint', 32);
819+
this._procField('id', 'uint', 32);
820+
this._procField('scheme_id_uri', 'string', -1);
821+
this._procField('value', 'string', -1);
822+
} else {
823+
this._procField('scheme_id_uri', 'string', -1);
824+
this._procField('value', 'string', -1);
825+
this._procField('timescale', 'uint', 32);
826+
this._procField('presentation_time_delta', 'uint', 32);
827+
this._procField('event_duration', 'uint', 32);
828+
this._procField('id', 'uint', 32);
829+
}
821830
this._procField('message_data', 'data', -1);
822831
};
823-
824832
// ISO/IEC 14496-12:2012 - 8.1.2 Free Space Box
825833
ISOBox.prototype._boxProcessors['free'] = ISOBox.prototype._boxProcessors['skip'] = function() {
826834
this._procField('data', 'data', -1);

0 commit comments

Comments
 (0)