From 08997c96b013a735be1b4afe725f4e5248b1a081 Mon Sep 17 00:00:00 2001 From: Raja Subramanian Date: Sun, 22 Oct 2023 00:08:41 +0530 Subject: [PATCH] Drop not relevant packet only if contiguous. (#2167) The probing + munging has not been set up to drop packets that follow a gap. Dropping such a packet leads to padding packet sequence numbers overlapping with regular packets. This change does two things though. - The not relevant packet will still not be sent over the wire. That could create holes in the sequence number leading to NACKs - Would the hole cause decode issues? Unclear as making this condition is hard. Simulating it is not showing issues, but that may not be producing the bad sequence if any. Will look at the ability to drop a packet after a gap later. --- pkg/sfu/forwarder.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/sfu/forwarder.go b/pkg/sfu/forwarder.go index f37bea03f..887c48566 100644 --- a/pkg/sfu/forwarder.go +++ b/pkg/sfu/forwarder.go @@ -1691,7 +1691,7 @@ func (f *Forwarder) getTranslationParamsVideo(extPkt *buffer.ExtPacket, layer in tp.shouldDrop = true if f.started && result.IsRelevant { // call to update highest incoming sequence number and other internal structures - if _, err := f.rtpMunger.UpdateAndGetSnTs(extPkt); err == nil { + if tpRTP, err := f.rtpMunger.UpdateAndGetSnTs(extPkt); err == nil && tpRTP.snOrdering == SequenceNumberOrderingContiguous { f.rtpMunger.PacketDropped(extPkt) } }