From 1c14239d89a02cda82b0ed262451573effd83060 Mon Sep 17 00:00:00 2001 From: xiongziliang <771730766@qq.com> Date: Fri, 13 Mar 2020 18:34:12 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=BC=96=E8=AF=91=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Extension/AACRtp.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Extension/AACRtp.cpp b/src/Extension/AACRtp.cpp index b55c03d5..cc2feb42 100644 --- a/src/Extension/AACRtp.cpp +++ b/src/Extension/AACRtp.cpp @@ -113,7 +113,10 @@ bool AACRtpDecoder::inputRtp(const RtpPacket::Ptr &rtppack, bool key_pos) { static const uint32_t max_size = sizeof(AACFrame::buffer) - ADTS_HEADER_LEN; while (ptr < end) { - auto size = std::min(max_size, (uint32_t) (end - ptr)); + auto size = (uint32_t) (end - ptr); + if(size > max_size){ + size = max_size; + } if (_adts->aac_frame_length + size > sizeof(AACFrame::buffer)) { //数据太多了,先清空 flushData();