diff options
author | Alex Converse <alex.converse@gmail.com> | 2010-11-07 06:05:12 +0300 |
---|---|---|
committer | Alex Converse <alex.converse@gmail.com> | 2010-11-07 06:05:12 +0300 |
commit | ebb7f7de8298b27326f6525859e1fa8a7ceaae22 (patch) | |
tree | 66beda6c1b3dc43f25ac73627f503c7d49b4823a /libavcodec/aacdec.c | |
parent | c77549c510370eaaa2e2bb1f15d1a30f29e30950 (diff) |
aaclatm: Eliminate dummy packets due to muxlength calculation.
Muxlength does not include the 3 bytes of AudioSyncStream() before the
AudioMuxElement(). If these three bytes are not accounted for the last three
bytes of the LATM packet are sent back to the decoder again.
Fixes issue244/mux2.share.ts
Originally committed as revision 25685 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/aacdec.c')
-rw-r--r-- | libavcodec/aacdec.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/aacdec.c b/libavcodec/aacdec.c index ab3a49aff7..c6e5951c6a 100644 --- a/libavcodec/aacdec.c +++ b/libavcodec/aacdec.c @@ -2310,9 +2310,9 @@ static int latm_decode_frame(AVCodecContext *avctx, void *out, int *out_size, if (get_bits(&gb, 11) != LOAS_SYNC_WORD) return AVERROR_INVALIDDATA; - muxlength = get_bits(&gb, 13); + muxlength = get_bits(&gb, 13) + 3; // not enough data, the parser should have sorted this - if (muxlength+3 > avpkt->size) + if (muxlength > avpkt->size) return AVERROR_INVALIDDATA; if ((err = read_audio_mux_element(latmctx, &gb)) < 0) |