Keep jitter playback moving after local drops

This commit is contained in:
Brandon McGinty (chatgpt)
2026-08-09 13:17:10 -04:00
committed by Brandon McGinty
parent f09c234ead
commit 4ad22db5aa
+6
View File
@@ -464,6 +464,12 @@ func (s *Stream) OnAudioStream(e *gumble.AudioStreamEvent) {
for {
pkt := popNext()
if pkt == nil {
// A locally dropped packet must not permanently stall the
// jitter buffer waiting for a sequence number that cannot arrive.
if len(jitterBuf) > 0 && jitterBuf[0].Sequence > jitterNextSeq {
jitterNextSeq = jitterBuf[0].Sequence
continue
}
break
}
reclaim()