Commit 072f66c9 authored by Vitor Sessak's avatar Vitor Sessak

Do not write junk in the end of truncated files. FATE

ra144 test will probably need to be updated.

Originally committed as revision 13839 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent ade8d8b9
...@@ -343,6 +343,7 @@ static int ra144_decode_frame(AVCodecContext * avctx, ...@@ -343,6 +343,7 @@ static int ra144_decode_frame(AVCodecContext * avctx,
if(buf_size < 20) { if(buf_size < 20) {
av_log(avctx, AV_LOG_ERROR, av_log(avctx, AV_LOG_ERROR,
"Frame too small (%d bytes). Truncated file?\n", buf_size); "Frame too small (%d bytes). Truncated file?\n", buf_size);
*data_size = 0;
return buf_size; return buf_size;
} }
init_get_bits(&gb, buf, 20 * 8); init_get_bits(&gb, buf, 20 * 8);
......
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