Commit 46a76dec authored by Vitor Sessak's avatar Vitor Sessak

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

Originally committed as revision 24745 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent a4fc3bd5
......@@ -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) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment