From 82e1c391a4aef1581b428de5f88695d586bb96b1 Mon Sep 17 00:00:00 2001 From: Raja Subramanian Date: Sun, 20 Mar 2022 13:36:29 +0530 Subject: [PATCH] Fix time stamp jump on layer switch (#543) --- pkg/sfu/forwarder.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/sfu/forwarder.go b/pkg/sfu/forwarder.go index 404b7b6f..6d5a5f8f 100644 --- a/pkg/sfu/forwarder.go +++ b/pkg/sfu/forwarder.go @@ -1320,7 +1320,7 @@ func (f *Forwarder) getTranslationParamsVideo(extPkt *buffer.ExtPacket, layer in // Compute how much time passed between the old RTP extPkt // and the current packet, and fix timestamp on source change tDiffMs := (extPkt.Arrival - f.lTSCalc) / 1e6 - td := uint32((tDiffMs * (int64(f.codec.ClockRate) / 1000)) / 1000) + td := uint32(tDiffMs * int64(f.codec.ClockRate) / 1000) if td == 0 { td = 1 }