Commit 23318a57 authored by Michael Niedermayer's avatar Michael Niedermayer

error_concealment: Check that the picture is not in a half setup state.

Fixes state becoming inconsistent
Fixes a null pointer dereference

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 8b47058c
......@@ -924,6 +924,12 @@ void ff_er_frame_end(MpegEncContext *s)
return;
};
if ( s->picture_structure == PICT_FRAME
&& s->current_picture.f.linesize[0] != s->current_picture_ptr->f.linesize[0]) {
av_log(s->avctx, AV_LOG_ERROR, "Error concealment not possible, frame not fully initialized\n");
return;
}
if (s->current_picture.f.motion_val[0] == NULL) {
av_log(s->avctx, AV_LOG_ERROR, "Warning MVs not available\n");
......
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