From 665a4595d16db137742a7a01895966934f3616ae Mon Sep 17 00:00:00 2001 From: Lidashuang Date: Fri, 12 Apr 2024 14:42:18 +0800 Subject: [PATCH] vdk playbakc skip fram --- format/rtspv2/demuxer.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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,