@ahmedrowaihi/mediabunny 1.65.2-beta.700 → 1.65.2-beta.701
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 +5 -1
- package/dist/bundles/mediabunny.min.cjs +1 -1
- package/dist/bundles/mediabunny.min.mjs +1 -1
- package/dist/bundles/mediabunny.mjs +5 -1
- package/dist/bundles/mediabunny.node.cjs +5 -1
- package/dist/modules/src/isobmff/isobmff-muxer.d.ts.map +1 -1
- package/dist/modules/src/isobmff/isobmff-muxer.js +9 -1
- package/dist/modules/src/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/isobmff/isobmff-muxer.ts +12 -1
|
@@ -43317,7 +43317,11 @@ var Mediabunny = (() => {
|
|
|
43317
43317
|
assert(trackData.lastSample);
|
|
43318
43318
|
const timescaleUnits = intoTimescale(sample.decodeTimestamp, trackData.timescale, false);
|
|
43319
43319
|
const delta = Math.round(timescaleUnits - trackData.lastTimescaleUnits);
|
|
43320
|
-
|
|
43320
|
+
if (delta < 0) {
|
|
43321
|
+
throw new Error(
|
|
43322
|
+
`Decode timestamps must not go backwards, but a packet presenting at ${sample.timestamp}s states a decode timestamp of ${sample.decodeTimestamp}s, which is before the previous packet's ${trackData.lastTimescaleUnits / trackData.timescale}s. Packets that state a decode timestamp must be added in decode order.`
|
|
43323
|
+
);
|
|
43324
|
+
}
|
|
43321
43325
|
trackData.lastTimescaleUnits += delta;
|
|
43322
43326
|
trackData.lastSample.timescaleUnitsToNextSample = delta;
|
|
43323
43327
|
if (!this.isFragmented) {
|