mirror of
https://github.com/arcodange-org/mediabunny.git
synced 2026-09-27 02:43:48 +02:00
Always flush when encountering a new key packet
This commit is contained in:
@@ -581,12 +581,8 @@ export abstract class BaseMediaSampleSink<
|
||||
)
|
||||
) {
|
||||
await decodePackets();
|
||||
|
||||
if (targetPacket.timestamp < lastPacket.timestamp) {
|
||||
// We're going back in time with this one, let's flush and reset to a clean state
|
||||
await flushDecoder();
|
||||
}
|
||||
}
|
||||
|
||||
timestampsOfInterest.push(targetPacket.timestamp);
|
||||
maxSequenceNumber = Math.max(targetPacket.sequenceNumber, maxSequenceNumber);
|
||||
|
||||
Reference in New Issue
Block a user