mediabunny 1.9.1 → 1.9.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundles/mediabunny.cjs +7 -2
- package/dist/bundles/mediabunny.min.cjs +3 -3
- package/dist/bundles/mediabunny.min.mjs +3 -3
- package/dist/bundles/mediabunny.mjs +7 -2
- package/dist/modules/src/adts/adts-muxer.d.ts.map +1 -1
- package/dist/modules/src/adts/adts-muxer.js +1 -0
- package/dist/modules/src/isobmff/isobmff-demuxer.d.ts.map +1 -1
- package/dist/modules/src/isobmff/isobmff-demuxer.js +5 -3
- package/dist/modules/src/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/adts/adts-muxer.ts +2 -0
- package/src/isobmff/isobmff-demuxer.ts +9 -3
|
@@ -1766,6 +1766,7 @@ var Mediabunny = (() => {
|
|
|
1766
1766
|
async addEncodedAudioPacket(track, packet, meta) {
|
|
1767
1767
|
const release = await this.mutex.acquire();
|
|
1768
1768
|
try {
|
|
1769
|
+
this.validateAndNormalizeTimestamp(track, packet.timestamp, packet.type === "key");
|
|
1769
1770
|
if (!this.audioSpecificConfig) {
|
|
1770
1771
|
validateAudioChunkMetadata(meta);
|
|
1771
1772
|
const description = meta?.decoderConfig?.description;
|
|
@@ -12473,11 +12474,15 @@ ${cue.notes ?? ""}`;
|
|
|
12473
12474
|
this.metadataReader.pos = sourceSize - 4;
|
|
12474
12475
|
const lastWord = this.metadataReader.readU32();
|
|
12475
12476
|
const potentialMfraPos = sourceSize - lastWord;
|
|
12476
|
-
if (potentialMfraPos >= 0 && potentialMfraPos
|
|
12477
|
-
await this.metadataReader.reader.loadRange(potentialMfraPos,
|
|
12477
|
+
if (potentialMfraPos >= 0 && potentialMfraPos <= sourceSize - MAX_BOX_HEADER_SIZE) {
|
|
12478
|
+
await this.metadataReader.reader.loadRange(potentialMfraPos, potentialMfraPos + 2 ** 16);
|
|
12478
12479
|
this.metadataReader.pos = potentialMfraPos;
|
|
12479
12480
|
const boxInfo = this.metadataReader.readBoxHeader();
|
|
12480
12481
|
if (boxInfo.name === "mfra") {
|
|
12482
|
+
await this.metadataReader.reader.loadRange(
|
|
12483
|
+
potentialMfraPos,
|
|
12484
|
+
potentialMfraPos + boxInfo.totalSize
|
|
12485
|
+
);
|
|
12481
12486
|
this.readContiguousBoxes(boxInfo.contentSize);
|
|
12482
12487
|
}
|
|
12483
12488
|
}
|