|
19377 | 19377 | dts: buffer[0].dts
|
19378 | 19378 | }; i < tagSize;)tag.data.set(buffer[0].data.subarray(0, tagSize - i), i), i += buffer[0].data.byteLength, bufferSize -= buffer[0].data.byteLength, buffer.shift();
|
19379 | 19379 | // find the start of the first frame and the end of the tag
|
19380 |
| - frameStart = 10, 0x40 & tag.data[5] && (frameStart += 4 + parseSyncSafeInteger$1(tag.data.subarray(10, 14)), tagSize -= parseSyncSafeInteger$1(tag.data.subarray(16, 20))); |
| 19380 | + frameStart = 10, 0x40 & tag.data[5] && (// advance the frame start past the extended header |
| 19381 | + frameStart += 4, frameStart += parseSyncSafeInteger$1(tag.data.subarray(10, 14)), tagSize -= parseSyncSafeInteger$1(tag.data.subarray(16, 20))); |
19381 | 19382 | // http://id3.org/id3v2.3.0#ID3v2_frame_overview
|
19382 | 19383 | do {
|
19383 | 19384 | if (// determine the number of bytes in this frame
|
|
19395 | 19396 | var d = frame.data, size = (0x01 & d[3]) << 30 | d[4] << 22 | d[5] << 14 | d[6] << 6 | d[7] >>> 2;
|
19396 | 19397 | size *= 4, size += 0x03 & d[7], frame.timeStamp = size, void 0 === tag.pts && void 0 === tag.dts && (tag.pts = frame.timeStamp, tag.dts = frame.timeStamp), this.trigger("timestamp", frame);
|
19397 | 19398 | }
|
19398 |
| - tag.frames.push(frame), frameStart += 10 + frameSize; |
| 19399 | + tag.frames.push(frame), frameStart += 10, frameStart += frameSize; |
19399 | 19400 | }while (frameStart < tagSize)
|
19400 | 19401 | this.trigger("data", tag);
|
19401 | 19402 | } // collect the entire frame so it can be parsed
|
|
20125 | 20126 | },
|
20126 | 20127 | parseAacTimestamp: function(packet) {
|
20127 | 20128 | var frameStart, frameSize, frame; // find the start of the first frame and the end of the tag
|
20128 |
| - frameStart = 10, 0x40 & packet[5] && (frameStart += 4 + parseSyncSafeInteger(packet.subarray(10, 14))); |
| 20129 | + frameStart = 10, 0x40 & packet[5] && (// advance the frame start past the extended header |
| 20130 | + frameStart += 4, frameStart += parseSyncSafeInteger(packet.subarray(10, 14))); |
20129 | 20131 | // http://id3.org/id3v2.3.0#ID3v2_frame_overview
|
20130 | 20132 | do {
|
20131 | 20133 | if (// determine the number of bytes in this frame
|
|
20140 | 20142 | break;
|
20141 | 20143 | }
|
20142 | 20144 | }
|
20143 |
| - frameStart += 10 + frameSize; // advance past the frame body |
| 20145 | + frameStart += 10, frameStart += frameSize; |
20144 | 20146 | }while (frameStart < packet.byteLength)
|
20145 | 20147 | return null;
|
20146 | 20148 | }
|
|
20567 | 20569 | var transmuxer_Transmuxer = _Transmuxer, bin_toUnsigned = function(value) {
|
20568 | 20570 | return value >>> 0;
|
20569 | 20571 | }, parseType_1 = function(buffer) {
|
20570 |
| - return "" + (String.fromCharCode(buffer[0]) + String.fromCharCode(buffer[1]) + String.fromCharCode(buffer[2]) + String.fromCharCode(buffer[3])); |
| 20572 | + var result = ""; |
| 20573 | + return result += String.fromCharCode(buffer[0]), result += String.fromCharCode(buffer[1]), result += String.fromCharCode(buffer[2]), result += String.fromCharCode(buffer[3]); |
20571 | 20574 | }, findBox_1 = function findBox(data, path) {
|
20572 | 20575 | var i, size, type, end, subresults, results = [];
|
20573 | 20576 | if (!path.length) // short-circuit the search for empty paths
|
|
0 commit comments