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 <magsoft@videolan.org>.
This commit is contained in:
Janne Grunau 2014-06-11 19:40:28 +02:00
parent 641e57230b
commit 0ddc53dabb
1 changed files with 4 additions and 1 deletions

View File

@ -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;
return;
}
dst->f = src->f;
dst->tf = &src->tf;