提交 6801eb0a 编写于 作者: M Michael Niedermayer

avcodec/vc1dec: do not crash when flushing without an allocated frame

Fixes Ticket3837
Found-by: NPiotr Bandurski <ami_stuff@o2.pl>
Signed-off-by: NMichael Niedermayer <michaelni@gmx.at>
上级 f4e814f7
......@@ -5514,7 +5514,7 @@ static void vc1_sprite_flush(AVCodecContext *avctx)
Since we can't enforce it, clear to black the missing sprite. This is
wrong but it looks better than doing nothing. */
if (f->data[0])
if (f && f->data[0])
for (plane = 0; plane < (s->flags&CODEC_FLAG_GRAY ? 1 : 3); plane++)
for (i = 0; i < v->sprite_height>>!!plane; i++)
memset(f->data[plane] + i * f->linesize[plane],
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册