Add HLS reading tests, InputTrack.hasOnlyKeyPackets, faster whole-file reading

This commit is contained in:
Vanilagy
2026-03-10 13:32:52 +01:00
parent c088a31384
commit ff523c01c8
13 changed files with 940 additions and 207 deletions
+3 -3
View File
@@ -20,12 +20,12 @@ import {
normalizeRotation,
promiseWithResolvers,
Rational,
roundToMultiple,
simplifyRational,
textEncoder,
toUint8Array,
uint8ArraysAreEqual,
writeBits,
roundToDivisor,
} from '../misc';
import {
CODEC_STRING_MAP,
@@ -911,8 +911,8 @@ export class MatroskaMuxer extends Muxer {
if (track.metadata.frameRate !== undefined) {
// Constrain the time values to the frame rate
timestamp = roundToMultiple(timestamp, 1 / track.metadata.frameRate);
duration = roundToMultiple(duration, 1 / track.metadata.frameRate);
timestamp = roundToDivisor(timestamp, track.metadata.frameRate);
duration = roundToDivisor(duration, track.metadata.frameRate);
}
const additions = trackData.info.alphaMode