mirror of
https://github.com/arcodange-org/mediabunny.git
synced 2026-09-30 20:33:55 +02:00
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:
+5
-2
@@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user