Commit d7c00e91 by xiongziliang

修复aac rtp解码相关的bug

parent fa249152
......@@ -92,13 +92,13 @@ bool AACRtpDecoder::inputRtp(const RtpPacket::Ptr &rtppack, bool key_pos) {
RtpCodec::inputRtp(rtppack, false);
int length = rtppack->length - rtppack->offset;
if (_adts->aac_frame_length + length - 4 > sizeof(AACFrame::buffer)) {
if (_adts->aac_frame_length + length > sizeof(AACFrame::buffer)) {
_adts->aac_frame_length = 7;
WarnL << "aac负载数据太长";
return false;
}
memcpy(_adts->buffer + _adts->aac_frame_length, rtppack->payload + rtppack->offset + 4, length - 4);
_adts->aac_frame_length += (length - 4);
memcpy(_adts->buffer + _adts->aac_frame_length, rtppack->payload + rtppack->offset, length);
_adts->aac_frame_length += length;
if (rtppack->mark == true) {
_adts->sequence = rtppack->sequence;
_adts->timeStamp = rtppack->timeStamp;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论