1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

Fix handling of truncated files. Should fix random FATE breakages.

Originally committed as revision 24745 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Vitor Sessak 2010-08-09 07:17:01 +00:00
parent a4fc3bd533
commit 46a76dec93

View File

@ -827,8 +827,12 @@ static int atrac3_decode_frame(AVCodecContext *avctx,
const uint8_t* databuf;
int16_t* samples = data;
if (buf_size < avctx->block_align)
if (buf_size < avctx->block_align) {
av_log(avctx, AV_LOG_ERROR,
"Frame too small (%d bytes). Truncated file?\n", buf_size);
*data_size = 0;
return buf_size;
}
/* Check if we need to descramble and what buffer to pass on. */
if (q->scrambled_stream) {