mirror of
https://github.com/livekit/livekit.git
synced 2026-08-28 05:04:10 +00:00
Fix min TS before first sender report (#1724)
This commit is contained in:
@@ -808,6 +808,11 @@ func (r *RTPStats) GetExpectedRTPTimestamp(at time.Time) (uint32, uint32, error)
|
||||
timeDiff := at.Sub(r.firstTime)
|
||||
expectedRTPDiff := timeDiff.Nanoseconds() * int64(r.params.ClockRate) / 1e9
|
||||
expectedExtRTP := r.extStartTS + uint64(expectedRTPDiff)
|
||||
|
||||
minTS := r.lastSRRTP
|
||||
if r.lastSRNTP == 0 {
|
||||
minTS = uint32(expectedExtRTP)
|
||||
}
|
||||
r.logger.Debugw(
|
||||
"expected RTP timestamp",
|
||||
"firstTime", r.firstTime.String(),
|
||||
@@ -817,10 +822,11 @@ func (r *RTPStats) GetExpectedRTPTimestamp(at time.Time) (uint32, uint32, error)
|
||||
"expectedRTPDiff", expectedRTPDiff,
|
||||
"expectedExtRTP", expectedExtRTP,
|
||||
"expectedRTP", uint32(expectedExtRTP),
|
||||
"minTS", minTS,
|
||||
"highestTS", r.highestTS,
|
||||
"highestTime", r.highestTime.String(),
|
||||
)
|
||||
return uint32(expectedExtRTP), r.lastSRRTP, nil
|
||||
return uint32(expectedExtRTP), minTS, nil
|
||||
}
|
||||
|
||||
func (r *RTPStats) GetRtcpSenderReport(ssrc uint32) (*rtcp.SenderReport, float64) {
|
||||
|
||||
Reference in New Issue
Block a user