From cded823b65410bd83ca7b84268a89031b405f25e Mon Sep 17 00:00:00 2001 From: xiongziliang <771730766@qq.com> Date: Fri, 15 May 2020 18:21:28 +0800 Subject: [PATCH] =?UTF-8?q?ps=20rtp=E6=8E=A8=E6=B5=81=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E9=9F=B3=E8=A7=86=E9=A2=91=E6=97=B6=E9=97=B4=E6=88=B3=E5=90=8C?= =?UTF-8?q?=E6=AD=A5=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Rtp/RtpProcess.cpp | 6 +----- src/Rtp/RtpProcess.h | 1 - 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/src/Rtp/RtpProcess.cpp b/src/Rtp/RtpProcess.cpp index 4d27332d..bcfa69e0 100644 --- a/src/Rtp/RtpProcess.cpp +++ b/src/Rtp/RtpProcess.cpp @@ -233,11 +233,10 @@ static const char *getCodecName(int codec_id) { void RtpProcess::onDecode(int stream,int codecid,int flags,int64_t pts,int64_t dts,const void *data,int bytes) { pts /= 90; dts /= 90; - _stamps[codecid].revise(dts,pts,dts,pts,false); + _dts = dts; switch (codecid) { case PSI_STREAM_H264: { - _dts = dts; if (!_codecid_video) { //获取到视频 _codecid_video = codecid; @@ -262,7 +261,6 @@ void RtpProcess::onDecode(int stream,int codecid,int flags,int64_t pts,int64_t d } case PSI_STREAM_H265: { - _dts = dts; if (!_codecid_video) { //获取到视频 _codecid_video = codecid; @@ -285,7 +283,6 @@ void RtpProcess::onDecode(int stream,int codecid,int flags,int64_t pts,int64_t d } case PSI_STREAM_AAC: { - _dts = dts; if (!_codecid_audio) { //获取到音频 _codecid_audio = codecid; @@ -304,7 +301,6 @@ void RtpProcess::onDecode(int stream,int codecid,int flags,int64_t pts,int64_t d case PSI_STREAM_AUDIO_G711A: case PSI_STREAM_AUDIO_G711U: { - _dts = dts; auto codec = codecid == PSI_STREAM_AUDIO_G711A ? CodecG711A : CodecG711U; if (!_codecid_audio) { //获取到音频 diff --git a/src/Rtp/RtpProcess.h b/src/Rtp/RtpProcess.h index cf252301..98140bc6 100644 --- a/src/Rtp/RtpProcess.h +++ b/src/Rtp/RtpProcess.h @@ -62,7 +62,6 @@ private: MultiMediaSourceMuxer::Ptr _muxer; std::shared_ptr _merger; Ticker _last_rtp_time; - unordered_map _stamps; uint32_t _dts = 0; Decoder::Ptr _decoder; std::weak_ptr _listener;