From 350a0e3f8102a21ff8c5031d571233662038d990 Mon Sep 17 00:00:00 2001 From: ziyue <1213642868@qq.com> Date: Wed, 27 Oct 2021 13:26:53 +0800 Subject: [PATCH] =?UTF-8?q?=E9=98=B2=E6=AD=A2=E5=86=85=E5=AD=98=E8=B6=8A?= =?UTF-8?q?=E7=95=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Extension/AACRtp.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Extension/AACRtp.cpp b/src/Extension/AACRtp.cpp index 3c55da7e..58c67934 100644 --- a/src/Extension/AACRtp.cpp +++ b/src/Extension/AACRtp.cpp @@ -132,8 +132,8 @@ bool AACRtpDecoder::inputRtp(const RtpPacket::Ptr &rtp, bool key_pos) { } void AACRtpDecoder::flushData() { - auto ptr = reinterpret_cast(_frame->_buffer.data()); - if ((ptr[0] == 0xFF && (ptr[1] & 0xF0) == 0xF0)) { + auto ptr = reinterpret_cast(_frame->data()); + if ((ptr[0] == 0xFF && (ptr[1] & 0xF0) == 0xF0) && _frame->size() > ADTS_HEADER_LEN) { //adts头打入了rtp包,不符合规范,兼容EasyPusher的bug _frame->_prefix_size = ADTS_HEADER_LEN; } else {