Mercurial > libavcodec.hg
comparison binkaudio.c @ 11264:bfffb50b80bc libavcodec
Use reported_size to truncate final Bink Audio frame
author | pross |
---|---|
date | Tue, 23 Feb 2010 10:28:11 +0000 |
parents | 359c8ba0698e |
children | 15dd07e86519 |
comparison
equal
deleted
inserted
replaced
11263:be99ac07dfeb | 11264:bfffb50b80bc |
---|---|
270 decode_block(s, samples, avctx->codec->id == CODEC_ID_BINKAUDIO_DCT); | 270 decode_block(s, samples, avctx->codec->id == CODEC_ID_BINKAUDIO_DCT); |
271 samples += s->block_size; | 271 samples += s->block_size; |
272 get_bits_align32(gb); | 272 get_bits_align32(gb); |
273 } | 273 } |
274 | 274 |
275 *data_size = (uint8_t*)samples - (uint8_t*)data; | 275 *data_size = FFMIN(reported_size, (uint8_t*)samples - (uint8_t*)data); |
276 if (reported_size != *data_size) { | |
277 av_log(avctx, AV_LOG_WARNING, "reported data size (%d) does not match output data size (%d)\n", | |
278 reported_size, *data_size); | |
279 } | |
280 return buf_size; | 276 return buf_size; |
281 } | 277 } |
282 | 278 |
283 AVCodec binkaudio_rdft_decoder = { | 279 AVCodec binkaudio_rdft_decoder = { |
284 "binkaudio_rdft", | 280 "binkaudio_rdft", |