# HG changeset patch # User pross # Date 1266920891 0 # Node ID bfffb50b80bce7973eae3c2b0ccdeae1f2f2bc97 # Parent be99ac07dfeb4938039c3ce57689881d6a735b64 Use reported_size to truncate final Bink Audio frame diff -r be99ac07dfeb -r bfffb50b80bc binkaudio.c --- 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; }