Commit 0ddc53da authored by Janne Grunau's avatar Janne Grunau

mpegvideo: synchronize AVFrame pointers in ERContext fully

Since error resilience uses AVFrame pointers instead of references it
has to copy NULL pointers too. After a codec flush the last/next frame
pointers in MpegEncContext are NULL and the old pointers remaining in
ERContext are invalid. Fixes a crash in vlc for android thumbnailer.
Reported and debugged by Adrien Maglo <>.
parent 641e5723
......@@ -2470,8 +2470,11 @@ void ff_mpeg_set_erpic(ERPicture *dst, Picture *src)
int i;
if (!src)
if (!src) {
dst->f = NULL;
dst->tf = NULL;
dst->f = src->f;
dst->tf = &src->tf;
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