From 047a4ac870646592140ce417aa329354231d258b Mon Sep 17 00:00:00 2001 From: Raja Subramanian Date: Thu, 26 Oct 2023 03:43:52 +0530 Subject: [PATCH] Apply repair to the newest cached report (#2186) --- pkg/sfu/buffer/rtpstats_sender.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/sfu/buffer/rtpstats_sender.go b/pkg/sfu/buffer/rtpstats_sender.go index ff262c11c..001bbad4d 100644 --- a/pkg/sfu/buffer/rtpstats_sender.go +++ b/pkg/sfu/buffer/rtpstats_sender.go @@ -700,6 +700,9 @@ func (r *RTPStatsSender) GetRtcpSenderReport(ssrc uint32, calculatedClockRate ui ntpDiffSinceLast := nowNTP.Time().Sub(r.srNewest.NTPTimestamp.Time()) nowRTPExt = r.srNewest.RTPTimestampExt + uint64(ntpDiffSinceLast.Seconds()*float64(r.params.ClockRate)) nowRTP = uint32(nowRTPExt) + + srData.RTPTimestamp = nowRTP + srData.RTPTimestampExt = nowRTPExt } r.srNewest = srData