Handle RED extended sequence number. (#2123)
When converting from RED -> Opus, if there is a loss, SFU recovers that loss if it can using a subsequent redundant packet. That path was not setting the extended sequence number properly. Also, ensuring use of monotonic clock for first packet time adjustment also.
This commit is contained in:
@@ -474,7 +474,8 @@ func (r *rtpStatsBase) maybeAdjustFirstPacketTime(ets uint64, extStartTS uint64)
|
||||
}
|
||||
|
||||
samplesDuration := time.Duration(float64(samplesDiff) / float64(r.params.ClockRate) * float64(time.Second))
|
||||
now := time.Now()
|
||||
timeSinceFirst := time.Since(r.firstTime)
|
||||
now := r.firstTime.Add(timeSinceFirst)
|
||||
firstTime := now.Add(-samplesDuration)
|
||||
if firstTime.Before(r.firstTime) {
|
||||
r.logger.Debugw(
|
||||
|
||||
Reference in New Issue
Block a user