Fix handling of PacketLost (#296)

They come accumulated already.
This commit is contained in:
Artur Shellunts
2021-12-30 11:06:00 +01:00
committed by GitHub
parent 2d8106c3d7
commit 1b66fe1e23
3 changed files with 59 additions and 9 deletions
+3 -1
View File
@@ -69,7 +69,9 @@ func (t *telemetryServiceInternal) HandleRTCP(streamType livekit.StreamType, par
if jitter := float64(rr.Jitter); jitter > stats.Jitter {
stats.Jitter = jitter
}
stats.PacketLost += uint64(rr.TotalLost)
if totalLost := uint64(rr.TotalLost); totalLost > stats.PacketLost {
stats.PacketLost = totalLost
}
}
if streamType == livekit.StreamType_DOWNSTREAM {
rtt := GetRttMs(pkt)