Commit 33fede39 authored by alexc's avatar alexc

Make aac_decode_frame() consume zero padding at the end of a packet.

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@23195 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent d08fa729
......@@ -1954,6 +1954,7 @@ static int aac_decode_frame(AVCodecContext *avccontext, void *data,
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(AVCodecContext *avccontext, void *data,
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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment