changeset 11264:bfffb50b80bc libavcodec

Use reported_size to truncate final Bink Audio frame
author pross
date Tue, 23 Feb 2010 10:28:11 +0000
parents be99ac07dfeb
children 444b3a297ca5
files binkaudio.c
diffstat 1 files changed, 1 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/binkaudio.c	Tue Feb 23 08:40:46 2010 +0000
+++ b/binkaudio.c	Tue Feb 23 10:28:11 2010 +0000
@@ -272,11 +272,7 @@
         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;
 }