mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-13 21:28:01 +02:00
Handle the case where we do not have enough input
Originally committed as revision 13282 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
9d2e6e84ce
commit
84490b744e
@ -343,9 +343,11 @@ static int ra144_decode_frame(AVCodecContext * avctx,
|
||||
Real144_internal *glob = avctx->priv_data;
|
||||
GetBitContext gb;
|
||||
|
||||
if(buf_size == 0)
|
||||
return 0;
|
||||
|
||||
if(buf_size < 20) {
|
||||
av_log(avctx, AV_LOG_ERROR,
|
||||
"Frame too small (%d bytes). Truncated file?\n", buf_size);
|
||||
return buf_size;
|
||||
}
|
||||
init_get_bits(&gb, buf, 20 * 8);
|
||||
|
||||
for (i=0; i<10; i++)
|
||||
|
Loading…
Reference in New Issue
Block a user