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;