Skip reporting skew for out-of-order reports (#2369)
This commit is contained in:
@@ -629,7 +629,7 @@ func (r *RTPStatsSender) GetRtcpSenderReport(ssrc uint32, calculatedClockRate ui
|
|||||||
RTPTimestampExt: nowRTPExt,
|
RTPTimestampExt: nowRTPExt,
|
||||||
At: now,
|
At: now,
|
||||||
}
|
}
|
||||||
if r.srNewest != nil {
|
if r.srNewest != nil && nowRTPExt >= r.srNewest.RTPTimestampExt {
|
||||||
timeSinceLastReport := nowNTP.Time().Sub(r.srNewest.NTPTimestamp.Time())
|
timeSinceLastReport := nowNTP.Time().Sub(r.srNewest.NTPTimestamp.Time())
|
||||||
rtpDiffSinceLastReport := nowRTPExt - r.srNewest.RTPTimestampExt
|
rtpDiffSinceLastReport := nowRTPExt - r.srNewest.RTPTimestampExt
|
||||||
windowClockRate := float64(rtpDiffSinceLastReport) / timeSinceLastReport.Seconds()
|
windowClockRate := float64(rtpDiffSinceLastReport) / timeSinceLastReport.Seconds()
|
||||||
|
|||||||
Reference in New Issue
Block a user