Normalize NTP time base when calculating RTT (#1297)

* Normalize NTP time base when calculating RTT

* seed last SR
This commit is contained in:
Raja Subramanian
2023-01-11 12:25:14 +05:30
committed by GitHub
parent 1db218a5b1
commit 7aad888e4e
4 changed files with 26 additions and 14 deletions
+2 -5
View File
@@ -16,7 +16,6 @@ import (
"github.com/pion/webrtc/v3"
"go.uber.org/atomic"
"github.com/livekit/mediatransportutil"
"github.com/livekit/protocol/livekit"
"github.com/livekit/protocol/logger"
@@ -1183,12 +1182,10 @@ func (d *DownTrack) handleRTCP(bytes []byte) {
}
rr.Reports = append(rr.Reports, r)
rtt := mediatransportutil.GetRttMs(&r)
if rtt != d.rtpStats.GetRtt() {
rtt, isRttChanged := d.rtpStats.UpdateFromReceiverReport(r)
if isRttChanged {
rttToReport = rtt
}
d.rtpStats.UpdateFromReceiverReport(r, rtt)
}
if len(rr.Reports) > 0 {
d.listenerLock.RLock()