|
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 */ |
2 | 2 | var ISOBoxer = {}; |
3 | 3 |
|
4 | 4 | ISOBoxer.parseBuffer = function(arrayBuffer) { |
@@ -812,15 +812,23 @@ ISOBox.prototype._boxProcessors['elst'] = function() { |
812 | 812 | // ISO/IEC 23009-1:2014 - 5.10.3.3 Event Message Box |
813 | 813 | ISOBox.prototype._boxProcessors['emsg'] = function() { |
814 | 814 | 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 | + } |
821 | 830 | this._procField('message_data', 'data', -1); |
822 | 831 | }; |
823 | | - |
824 | 832 | // ISO/IEC 14496-12:2012 - 8.1.2 Free Space Box |
825 | 833 | ISOBox.prototype._boxProcessors['free'] = ISOBox.prototype._boxProcessors['skip'] = function() { |
826 | 834 | this._procField('data', 'data', -1); |
|
0 commit comments