Count repeated NACK only on a hit (#611)

This commit is contained in:
Raja Subramanian
2022-04-13 18:01:59 +05:30
committed by GitHub
parent ee7bb0a1ad
commit 587534d121
+5 -4
View File
@@ -1082,10 +1082,6 @@ func (d *DownTrack) retransmitPackets(nacks []uint16) {
continue continue
} }
if meta.nacked > 1 {
numRepeatedNACKs++
}
if pool != nil { if pool != nil {
PacketFactory.Put(pool) PacketFactory.Put(pool)
pool = nil pool = nil
@@ -1100,6 +1096,11 @@ func (d *DownTrack) retransmitPackets(nacks []uint16) {
} }
continue continue
} }
if meta.nacked > 1 {
numRepeatedNACKs++
}
var pkt rtp.Packet var pkt rtp.Packet
if err = pkt.Unmarshal(pktBuff[:n]); err != nil { if err = pkt.Unmarshal(pktBuff[:n]); err != nil {
continue continue