Handle case of sequence number jump just after start. (#4150)

It is possible that the stream stops just after start and
restarts much later introducing a large gap in sequence number.
That could look like an unhandled case because the wrap back handler
does not have enough packets yet.

Let other checks based on time stamp gap take effect and only if that
also leaves the sequence number unhandled, drop the packet.
This commit is contained in:
Raja Subramanian
2025-12-12 00:29:15 +05:30
committed by GitHub
parent 97099cae3e
commit ca4b56d2d5
3 changed files with 16 additions and 13 deletions
+2 -1
View File
@@ -1409,12 +1409,13 @@ func (b *Buffer) seedKeyFrame(keyFrameSeederGeneration int32) {
for {
if b.closed.Load() || b.keyFrameSeederGeneration.Load() != keyFrameSeederGeneration {
b.logger.Debugw("stopping key frame seeder: stopped")
return
}
select {
case <-timer.C:
b.logger.Infow("stopping key frame seeder: timeout")
b.logger.Debugw("stopping key frame seeder: timeout")
return
case <-ticker.C: