Commit 6a0b5e34 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/mpegvideo: fix null pointer dereference

Fixes: 111342.ogm with ffplay
Found-by: 's avatarDale Curtis <dalecurtis@google.com>
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 5b881499
......@@ -931,7 +931,7 @@ int ff_mpeg_update_thread_context(AVCodecContext *dst,
#define UPDATE_PICTURE(pic)\
do {\
ff_mpeg_unref_picture(s, &s->pic);\
if (s1->pic.f->buf[0])\
if (s1->pic.f && s1->pic.f->buf[0])\
ret = ff_mpeg_ref_picture(s, &s->pic, &s1->pic);\
else\
ret = update_picture_tables(&s->pic, &s1->pic);\
......
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