Fix HLS writing an incomplete init segment for sparse segments, improve decoder config validation, fix getFirstTimestamp() for Inputs with zero-packet tracks, allow zero-track muxing for some formats that allow it, add new track metadata that allows you to specify the decoder config early (enables zero-packet tracks), fix trafIndices in sparse fragmented MP4s, fix assertion errors in MPEG-TS demuxer

This commit is contained in:
Vanilagy
2026-08-08 17:00:36 +02:00
parent 7ec538e175
commit 5b22c8c17d
23 changed files with 1433 additions and 204 deletions
+5 -2
View File
@@ -336,8 +336,11 @@ export class Input<S extends Source = Source> extends EventEmitter<InputEvents>
return 0;
}
const firstTimestamps = await Promise.all(filtered.map(x => x.getFirstTimestamp()));
return Math.min(...firstTimestamps);
// Only count the timestamps of tracks that have at least one packet
const firstPackets = await Promise.all(filtered.map(x => x._backing.getFirstPacket({ metadataOnly: true })));
const result = Math.min(...firstPackets.map(x => x?.timestamp ?? Infinity));
return result === Infinity ? 0 : result;
}
/**