Fix atTimestamps iterator

This commit is contained in:
Vanilagy
2025-01-14 21:23:37 +01:00
parent 45474764ca
commit 9af3e6eb66
4 changed files with 44 additions and 17 deletions
+4 -1
View File
@@ -392,7 +392,10 @@ export abstract class BaseMediaFrameSink<
}
let frameUsed = false;
while (samplesOfInterest.length > 0 && samplesOfInterest[0] === wrappedFrame.sample) {
while (
samplesOfInterest.length > 0
&& samplesOfInterest[0]!.is(wrappedFrame.sample as EncodedVideoSample & EncodedAudioSample)
) {
pushToQueue(this._duplicateFrame(wrappedFrame));
samplesOfInterest.shift();
frameUsed = true;