From 895e7d47140a82eb25772bffc2cd55d7b3bfbdc5 Mon Sep 17 00:00:00 2001 From: xiongziliang <771730766@qq.com> Date: Fri, 10 Apr 2020 14:08:10 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84rtp=E6=8E=A8=E6=B5=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Rtp/RtpProcess.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Rtp/RtpProcess.cpp b/src/Rtp/RtpProcess.cpp index fd37904d..2efcb722 100644 --- a/src/Rtp/RtpProcess.cpp +++ b/src/Rtp/RtpProcess.cpp @@ -204,10 +204,10 @@ void RtpProcess::onDecode(int stream,int codecid,int flags,int64_t pts,int64_t d pts /= 90; dts /= 90; _stamps[codecid].revise(dts,pts,dts,pts,false); - _dts = dts; switch (codecid) { case STREAM_VIDEO_H264: { + _dts = dts; if (!_codecid_video) { //获取到视频 _codecid_video = codecid; @@ -232,6 +232,7 @@ void RtpProcess::onDecode(int stream,int codecid,int flags,int64_t pts,int64_t d } case STREAM_VIDEO_H265: { + _dts = dts; if (!_codecid_video) { //获取到视频 _codecid_video = codecid; @@ -254,6 +255,7 @@ void RtpProcess::onDecode(int stream,int codecid,int flags,int64_t pts,int64_t d } case STREAM_AUDIO_AAC: { + _dts = dts; if (!_codecid_audio) { //获取到音频 _codecid_audio = codecid;