Skip to content

Commit 84e4b7c

Browse files
authored
Do not check for out-of-order if there is no previous packet. (#756)
1 parent 4cdfa42 commit 84e4b7c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/synchronizer/track.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ func (t *TrackSynchronizer) getPTSWithRebase(pkt jitter.ExtPacket) (time.Duratio
315315
}
316316

317317
// packets are expected in order, just a safety net
318-
if (ts - t.lastTS) > (1 << 31) {
318+
if t.lastTS != 0 && (ts-t.lastTS) > (1<<31) {
319319
t.numDroppedOutOfOrder++
320320
t.logger.Infow(
321321
"dropping out-of-order packet",

0 commit comments

Comments
 (0)