mirror of
https://github.com/livekit/livekit.git
synced 2026-08-28 11:44:43 +00:00
Duplicate packets should not update packet loss counter (#417)
This commit is contained in:
@@ -381,10 +381,12 @@ func (b *Buffer) updateStreamState(p *rtp.Packet, pktSize int, arrivalTime int64
|
||||
b.nacker.Remove(sn)
|
||||
}
|
||||
} else {
|
||||
b.stats.TotalPacketsLost += (uint32(diff) - 1)
|
||||
if b.nacker != nil && diff > 1 {
|
||||
for lost := b.highestSN + 1; lost != sn; lost++ {
|
||||
b.nacker.Push(lost)
|
||||
if diff > 1 {
|
||||
b.stats.TotalPacketsLost += (uint32(diff) - 1)
|
||||
if b.nacker != nil {
|
||||
for lost := b.highestSN + 1; lost != sn; lost++ {
|
||||
b.nacker.Push(lost)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user