[FFmpeg-cvslog] r25685 - trunk/libavcodec/aacdec.c

alexc subversion
Sun Nov 7 04:05:13 CET 2010


Author: alexc
Date: Sun Nov  7 04:05:12 2010
New Revision: 25685

Log:
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

Modified:
   trunk/libavcodec/aacdec.c

Modified: trunk/libavcodec/aacdec.c
==============================================================================
--- trunk/libavcodec/aacdec.c	Sun Nov  7 00:26:49 2010	(r25684)
+++ trunk/libavcodec/aacdec.c	Sun Nov  7 04:05:12 2010	(r25685)
@@ -2310,9 +2310,9 @@ static int latm_decode_frame(AVCodecCont
     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)



More information about the ffmpeg-cvslog mailing list