Fix time stamp jump on layer switch (#543)

This commit is contained in:
Raja Subramanian
2022-03-20 13:36:29 +05:30
committed by GitHub
parent 1d03a5a3b6
commit 82e1c391a4
+1 -1
View File
@@ -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
}