mpegvideo: reset context state on failed thread update.
Fixes assertion failure Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
9a038a95d2
commit
e1d7d4bd13
@ -584,8 +584,11 @@ int ff_mpeg_update_thread_context(AVCodecContext *dst,
|
|||||||
if (s1->context_initialized){
|
if (s1->context_initialized){
|
||||||
s->picture_range_start += MAX_PICTURE_COUNT;
|
s->picture_range_start += MAX_PICTURE_COUNT;
|
||||||
s->picture_range_end += MAX_PICTURE_COUNT;
|
s->picture_range_end += MAX_PICTURE_COUNT;
|
||||||
if((err = ff_MPV_common_init(s)) < 0)
|
if((err = ff_MPV_common_init(s)) < 0){
|
||||||
|
memset(s, 0, sizeof(MpegEncContext));
|
||||||
|
s->avctx = dst;
|
||||||
return err;
|
return err;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user