From bdda337f330e7094ec9ffec181fdfeabb948e4a3 Mon Sep 17 00:00:00 2001 From: winlin Date: Wed, 4 Feb 2015 14:42:49 +0800 Subject: [PATCH] fix aac adts bug, the frame length is 2bits. --- trunk/src/protocol/srs_raw_avc.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trunk/src/protocol/srs_raw_avc.cpp b/trunk/src/protocol/srs_raw_avc.cpp index 65f42c683..1b7c1fe01 100644 --- a/trunk/src/protocol/srs_raw_avc.cpp +++ b/trunk/src/protocol/srs_raw_avc.cpp @@ -393,7 +393,7 @@ int SrsRawAacStream::adts_demux(SrsStream* stream, char** pframe, int* pnb_frame // aac_frame_length 13 bslbf: Length of the frame including headers and error_check in bytes. // use the left 2bits as the 13 and 12 bit, // the aac_frame_length is 13bits, so we move 13-2=11. - int16_t fh_aac_frame_length = (fh1 << 11) & 0x0800; + int16_t fh_aac_frame_length = (fh1 << 11) & 0x1800; int32_t fh2 = stream->read_3bytes(); // aac_frame_length 13 bslbf: consume the first 13-2=11bits