Commit 7f9900e0 authored by alexc's avatar alexc

AAC: Return the number of bytes consumed in decoding a frame.

The libfaad wrapper does this.


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@22206 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent c4882a1e
......@@ -1948,6 +1948,7 @@ static int aac_decode_frame(AVCodecContext *avccontext, void *data,
GetBitContext gb;
enum RawDataBlockType elem_type;
int err, elem_id, data_size_tmp;
int buf_consumed;
init_get_bits(&gb, buf, buf_size * 8);
......@@ -2048,7 +2049,8 @@ static int aac_decode_frame(AVCodecContext *avccontext, void *data,
if (ac->output_configured)
ac->output_configured = OC_LOCKED;
return buf_size;
buf_consumed = (get_bits_count(&gb) + 7) >> 3;
return buf_size > buf_consumed ? 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