Duplicate packets should not update packet loss counter (#417)
This commit is contained in:
@@ -381,12 +381,14 @@ func (b *Buffer) updateStreamState(p *rtp.Packet, pktSize int, arrivalTime int64
|
|||||||
b.nacker.Remove(sn)
|
b.nacker.Remove(sn)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
if diff > 1 {
|
||||||
b.stats.TotalPacketsLost += (uint32(diff) - 1)
|
b.stats.TotalPacketsLost += (uint32(diff) - 1)
|
||||||
if b.nacker != nil && diff > 1 {
|
if b.nacker != nil {
|
||||||
for lost := b.highestSN + 1; lost != sn; lost++ {
|
for lost := b.highestSN + 1; lost != sn; lost++ {
|
||||||
b.nacker.Push(lost)
|
b.nacker.Push(lost)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if sn < b.highestSN {
|
if sn < b.highestSN {
|
||||||
b.cycle++
|
b.cycle++
|
||||||
|
|||||||
Reference in New Issue
Block a user