Skip to content

Commit

Permalink
Reject video packets beyond our valid sequence number range for the F…
Browse files Browse the repository at this point in the history
…EC block
  • Loading branch information
cgutman committed Oct 11, 2023
1 parent 836bc66 commit 574ad6e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/RtpVideoQueue.c
Original file line number Diff line number Diff line change
Expand Up @@ -700,9 +700,10 @@ int RtpvAddPacket(PRTP_VIDEO_QUEUE queue, PRTP_PACKET packet, int length, PRTPV_
queue->bufferHighestSequenceNumber = U16(queue->bufferFirstParitySequenceNumber + queue->bufferParityPackets - 1);
queue->multiFecCurrentBlockNumber = fecCurrentBlockNumber;
queue->multiFecLastBlockNumber = (nvPacket->multiFecBlocks >> 6) & 0x3;
} else if (isBefore16(queue->bufferHighestSequenceNumber, packet->sequenceNumber)) {
// In rare cases, we get extra parity packets. It's rare enough that it's probably
// not worth handling, so we'll just drop them.
}

// Reject packets above our FEC queue valid sequence number range
if (isBefore16(queue->bufferHighestSequenceNumber, packet->sequenceNumber)) {
return RTPF_RET_REJECTED;
}

Expand Down

0 comments on commit 574ad6e

Please sign in to comment.