diff options
author | Peter Ross <pross@xvid.org> | 2010-02-23 10:28:11 +0000 |
---|---|---|
committer | Peter Ross <pross@xvid.org> | 2010-02-23 10:28:11 +0000 |
commit | c8c77d8d97be1eb863da606d282590c8ef5c44e5 (patch) | |
tree | 6ba672b0b0d238ab4a224b0f0c6ca80da6abd5b7 /libavcodec | |
parent | 589760c68be80797a2982a2e0e62e37bfc0800e4 (diff) | |
download | ffmpeg-c8c77d8d97be1eb863da606d282590c8ef5c44e5.tar.gz |
Use reported_size to truncate final Bink Audio frame
Originally committed as revision 21993 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/binkaudio.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/libavcodec/binkaudio.c b/libavcodec/binkaudio.c index 1aca5bceb0..b3f74d04d3 100644 --- a/libavcodec/binkaudio.c +++ b/libavcodec/binkaudio.c @@ -272,11 +272,7 @@ static int decode_frame(AVCodecContext *avctx, get_bits_align32(gb); } - *data_size = (uint8_t*)samples - (uint8_t*)data; - if (reported_size != *data_size) { - av_log(avctx, AV_LOG_WARNING, "reported data size (%d) does not match output data size (%d)\n", - reported_size, *data_size); - } + *data_size = FFMIN(reported_size, (uint8_t*)samples - (uint8_t*)data); return buf_size; } |