Normalize NTP time base when calculating RTT (#1297)
* Normalize NTP time base when calculating RTT * seed last SR
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user