Mercurial > libavcodec.hg
changeset 11362:1682a19a0881 libavcodec
AAC: Return the number of bytes consumed in decoding a frame.
The libfaad wrapper does this.
author | alexc |
---|---|
date | Thu, 04 Mar 2010 12:34:15 +0000 |
parents | 3fa1224ae130 |
children | a4596f842e18 |
files | aac.c |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/aac.c Thu Mar 04 10:01:03 2010 +0000 +++ b/aac.c Thu Mar 04 12:34:15 2010 +0000 @@ -1948,6 +1948,7 @@ 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 @@ 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)