Fix handling of duplicate packets when OOS data was also received

It's possible for a sequence of packets seqnums like 2, 0, 1, 2 to end up hitting the fast path
again after filling in gap of OOS packets. The fast path assumes duplicate packets are caught
by the next contiguous sequence number check, but this is only true if that value is kept updated.

Since the slow path doesn't update the next contiguous sequence number, it's no longer safe to
use the fast path for the remaining packets in the frame because duplicate packets would be
mishandled.

Queuing duplicate packets violates all sorts of queue assumptions and can cause us to return
corrupt data to the decoder or attempt an FEC recovery without enough shards.
This commit is contained in:
Cameron Gutman
2023-09-23 12:08:16 -04:00
parent 7a6d12fc4e
commit 1be56269a3
2 changed files with 18 additions and 6 deletions

View File

@@ -34,6 +34,7 @@ typedef struct _RTP_VIDEO_QUEUE {
uint32_t fecPercentage;
uint32_t nextContiguousSequenceNumber;
uint32_t missingPackets; // # of holes behind receivedHighestSequenceNumber
bool useFastQueuePath;
bool reportedLostFrame;
uint32_t currentFrameNumber;