mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-10-06 20:23:43 +08:00
修复aac rtp解码相关的bug
This commit is contained in:
parent
fa24915247
commit
d7c00e91e0
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue
Block a user