[FFmpeg-cvslog] r23229 - in branches/0.6: . libavcodec/aac.c
siretart
subversion
Fri May 21 22:23:22 CEST 2010
Author: siretart
Date: Fri May 21 22:23:22 2010
New Revision: 23229
Log:
Make aac_decode_frame() consume zero padding at the end of a packet.
backport r23195 by alexc
Modified:
branches/0.6/ (props changed)
branches/0.6/libavcodec/aac.c
Modified: branches/0.6/libavcodec/aac.c
==============================================================================
--- branches/0.6/libavcodec/aac.c Fri May 21 22:22:18 2010 (r23228)
+++ branches/0.6/libavcodec/aac.c Fri May 21 22:23:22 2010 (r23229)
@@ -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