From bbcb4d41f7e55ca971b57d3dbbe555b3ba34d392 Mon Sep 17 00:00:00 2001 From: xiongziliang <771730766@qq.com> Date: Mon, 29 Jun 2020 11:55:13 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dps=E8=A7=A3=E6=9E=90=E8=AF=AF?= =?UTF-8?q?=E5=88=A4=E4=B8=BAaac=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Rtp/Decoder.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Rtp/Decoder.cpp b/src/Rtp/Decoder.cpp index cd8e566d..92402a95 100644 --- a/src/Rtp/Decoder.cpp +++ b/src/Rtp/Decoder.cpp @@ -158,6 +158,11 @@ void DecoderImp::onDecode(int stream,int codecid,int flags,int64_t pts,int64_t d } case PSI_STREAM_AAC: { + uint8_t *ptr = (uint8_t *)data; + if(!(bytes > 7 && ptr[0] == 0xFF && (ptr[1] & 0xF0) == 0xF0)){ + //这不是aac + break; + } if (!_codecid_audio) { //获取到音频 _codecid_audio = codecid;