[FFmpeg-cvslog] r23195 - trunk/libavcodec/aac.c
alexc
subversion
Wed May 19 22:18:34 CEST 2010
Author: alexc
Date: Wed May 19 22:18:34 2010
New Revision: 23195
Log:
Make aac_decode_frame() consume zero padding at the end of a packet.
Modified:
trunk/libavcodec/aac.c
Modified: trunk/libavcodec/aac.c
==============================================================================
--- trunk/libavcodec/aac.c Wed May 19 22:13:50 2010 (r23194)
+++ trunk/libavcodec/aac.c Wed May 19 22:18:34 2010 (r23195)
@@ -1954,6 +1954,7 @@ static int aac_decode_frame(AVCodecConte
int err, elem_id, data_size_tmp;
int buf_consumed;
int samples = 1024, multiplier;
+ int buf_offset;
init_get_bits(&gb, buf, buf_size * 8);
@@ -2065,7 +2066,11 @@ static int aac_decode_frame(AVCodecConte
ac->output_configured = OC_LOCKED;
buf_consumed = (get_bits_count(&gb) + 7) >> 3;
- return buf_size > buf_consumed ? buf_consumed : buf_size;
+ for (buf_offset = buf_consumed; buf_offset < buf_size; buf_offset++)
+ if (buf[buf_offset])
+ break;
+
+ return buf_size > buf_offset ? buf_consumed : buf_size;
}
static av_cold int aac_decode_close(AVCodecContext *avccontext)
More information about the ffmpeg-cvslog
mailing list