Fix time stamp jump on layer switch (#543)
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user