diff --git a/3rdpart/media-server b/3rdpart/media-server index 1603194d..737b8d85 160000 --- a/3rdpart/media-server +++ b/3rdpart/media-server @@ -1 +1 @@ -Subproject commit 1603194dafdcecda9036e5741ec8d3e8c9ab1e01 +Subproject commit 737b8d852eeb1a36bc77854f327fbbef7cfb81be diff --git a/src/Rtp/RtpDecoder.cpp b/src/Rtp/RtpDecoder.cpp index c0bebb8a..7bcd23e1 100644 --- a/src/Rtp/RtpDecoder.cpp +++ b/src/Rtp/RtpDecoder.cpp @@ -62,7 +62,7 @@ void RtpDecoder::decodeRtp(const void *data, int bytes) { uint8_t rtp_type = 0x7F & ((uint8_t *) data)[1]; InfoL << "rtp type:" << (int) rtp_type; - _rtp_decoder = rtp_payload_decode_create(rtp_type, "MP4V-ES", &s_func, this); + _rtp_decoder = rtp_payload_decode_create(rtp_type, "MP2P", &s_func, this); if (!_rtp_decoder) { WarnL << "unsupported rtp type:" << (int) rtp_type << ",size:" << bytes << ",hexdump" << hexdump(data, bytes > 16 ? 16 : bytes); } diff --git a/src/Rtp/RtpProcess.cpp b/src/Rtp/RtpProcess.cpp index eeba54b7..654ac363 100644 --- a/src/Rtp/RtpProcess.cpp +++ b/src/Rtp/RtpProcess.cpp @@ -180,9 +180,11 @@ void RtpProcess::onRtpDecode(const uint8_t *packet, int bytes, uint32_t timestam //创建解码器 if(checkTS(packet, bytes)){ //猜测是ts负载 + InfoL << "judged to be TS: " << printSSRC(_ssrc); _decoder = Decoder::createDecoder(Decoder::decoder_ts); }else{ //猜测是ps负载 + InfoL << "judged to be PS: " << printSSRC(_ssrc); _decoder = Decoder::createDecoder(Decoder::decoder_ps); } _decoder->setOnDecode([this](int stream,int codecid,int flags,int64_t pts,int64_t dts,const void *data,int bytes){