From 33ea125333fd237295fd9e67eb3a8792d487f481 Mon Sep 17 00:00:00 2001 From: fanyun1 <18335108150@163.com> Date: Tue, 14 Mar 2023 09:39:34 +0800 Subject: [PATCH] judge h264 keyframe error Signed-off-by: fanyun1 <18335108150@163.com> --- format/rtspv2/client.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/format/rtspv2/client.go b/format/rtspv2/client.go index 17bf659..7017868 100644 --- a/format/rtspv2/client.go +++ b/format/rtspv2/client.go @@ -693,7 +693,7 @@ func (client *RTSPClient) RTPDemuxer(payloadRAW *[]byte) ([]*av.Packet, bool) { Data: append(binSize(len(packet[2:size+2])), packet[2:size+2]...), CompositionTime: time.Duration(1) * time.Millisecond, Idx: client.videoIDX, - IsKeyFrame: naluType == 5, + IsKeyFrame: naluTypefs == 5, Duration: time.Duration(float32(timestamp-client.PreVideoTS)/90) * time.Millisecond, Time: time.Duration(timestamp/90) * time.Millisecond, })