Process RTX packets for TWCC (#406)

The SRTP replay detection was disabled recently.
But, they were effectively getting dropped in `sfu.bucket`.

Doing two things with RTX packets in this PR
1. Update stats - add to packet count and bytes
2. Process header extension - to process TWCC
This commit is contained in:
Raja Subramanian
2022-02-05 23:25:53 +05:30
committed by GitHub
parent 7f2a5ae036
commit 4a9b844781
2 changed files with 37 additions and 15 deletions
+2 -2
View File
@@ -33,8 +33,8 @@ func (b *Bucket) AddPacket(pkt []byte) ([]byte, error) {
b.init = true
}
diff := sn - b.headSN
if diff > (1 << 15) {
// out-of-order
if diff == 0 || diff > (1<<15) {
// duplicate of lsat packet or out-of-order
return b.set(sn, pkt)
}
b.headSN = sn