diff --git a/format/rtspv2/demuxer.go b/format/rtspv2/demuxer.go index e59c453..05ea449 100644 --- a/format/rtspv2/demuxer.go +++ b/format/rtspv2/demuxer.go @@ -343,12 +343,10 @@ func (client *RTSPClient) appendPlaybackVideoPacket(retmap []*av.Packet, nal []b prePkt[i].RealTimestamp = client.preKeyRealVideoTs * 1000 client.iterateDruation = 0 } - client.iterateDruation += prePkt[i].Duration } else { prePkt[i].RealTimestamp = client.preKeyRealVideoTs*1000 + client.iterateDruation.Milliseconds() - client.iterateDruation += prePkt[i].Duration } - + client.iterateDruation += prePkt[i].Duration client.preRealVideoMs = prePkt[i].RealTimestamp // fmt.Println("playback duration", // prePkt[i].IsKeyFrame,