mediabunny 1.50.4 → 1.50.6
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 +13 -5
- package/dist/bundles/mediabunny.min.cjs +1 -1
- package/dist/bundles/mediabunny.min.mjs +1 -1
- package/dist/bundles/mediabunny.mjs +13 -5
- package/dist/bundles/mediabunny.node.cjs +13 -5
- package/dist/modules/src/input-track.d.ts.map +1 -1
- package/dist/modules/src/input-track.js +2 -1
- package/dist/modules/src/media-sink.d.ts.map +1 -1
- package/dist/modules/src/media-sink.js +12 -4
- package/dist/modules/src/source.d.ts.map +1 -1
- package/dist/modules/src/source.js +7 -3
- package/dist/modules/src/tsconfig.tsbuildinfo +1 -1
- package/package.json +5 -5
- package/src/input-track.ts +2 -1
- package/src/media-sink.ts +11 -4
- package/src/source.ts +7 -3
|
@@ -17112,7 +17112,7 @@ var Mediabunny = (() => {
|
|
|
17112
17112
|
throw error;
|
|
17113
17113
|
}
|
|
17114
17114
|
}).finally(() => {
|
|
17115
|
-
if (worker.running
|
|
17115
|
+
if (worker.running) {
|
|
17116
17116
|
return;
|
|
17117
17117
|
}
|
|
17118
17118
|
if (this.queuedReads.length > 0) {
|
|
@@ -17124,13 +17124,15 @@ var Mediabunny = (() => {
|
|
|
17124
17124
|
}
|
|
17125
17125
|
}
|
|
17126
17126
|
const queuedRead = this.queuedReads[oldestIndex];
|
|
17127
|
-
this.queuedReads.splice(oldestIndex, 1);
|
|
17128
17127
|
const newWorker = this.createWorker(
|
|
17129
17128
|
queuedRead.hole.start,
|
|
17130
17129
|
queuedRead.hole.end,
|
|
17131
17130
|
queuedRead.strictTarget
|
|
17132
17131
|
);
|
|
17133
|
-
|
|
17132
|
+
if (!newWorker) {
|
|
17133
|
+
return;
|
|
17134
|
+
}
|
|
17135
|
+
this.queuedReads.splice(oldestIndex, 1);
|
|
17134
17136
|
newWorker.pendingSlices = queuedRead.pendingSlices;
|
|
17135
17137
|
this.runWorker(newWorker);
|
|
17136
17138
|
}
|
|
@@ -22620,10 +22622,16 @@ var Mediabunny = (() => {
|
|
|
22620
22622
|
if (isChromium() && this.currentPacketIndex === 0) {
|
|
22621
22623
|
if (this.codec === "avc") {
|
|
22622
22624
|
const filteredNalUnits = [];
|
|
22625
|
+
let hasFrameData = false;
|
|
22623
22626
|
for (const loc of iterateAvcNalUnits(packet.data, this.decoderConfig)) {
|
|
22624
22627
|
const type = extractNalUnitTypeForAvc(packet.data[loc.offset]);
|
|
22628
|
+
hasFrameData ||= type >= 1 && type <= 5;
|
|
22625
22629
|
if (type === 9 /* AUD */) {
|
|
22626
|
-
|
|
22630
|
+
if (hasFrameData) {
|
|
22631
|
+
break;
|
|
22632
|
+
} else {
|
|
22633
|
+
filteredNalUnits.length = 0;
|
|
22634
|
+
}
|
|
22627
22635
|
}
|
|
22628
22636
|
if (!(type >= 20 && type <= 31)) {
|
|
22629
22637
|
filteredNalUnits.push(packet.data.subarray(loc.offset, loc.offset + loc.length));
|
|
@@ -24089,7 +24097,7 @@ var Mediabunny = (() => {
|
|
|
24089
24097
|
return requireSync(this._backing.getCodec(), "codec", "getCodec");
|
|
24090
24098
|
}
|
|
24091
24099
|
async hasOnlyKeyPackets() {
|
|
24092
|
-
return await this._backing.getHasOnlyKeyPackets?.() ??
|
|
24100
|
+
return await this._backing.getHasOnlyKeyPackets?.() ?? await this._backing.getCodec() === "prores";
|
|
24093
24101
|
}
|
|
24094
24102
|
/** Returns the width in pixels of the track's coded samples, before any transformations or rotations. */
|
|
24095
24103
|
async getCodedWidth() {
|