Skip to content
Snippets Groups Projects
Commit 23318a57 authored by Michael Niedermayer's avatar Michael Niedermayer
Browse files

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: default avatarMichael Niedermayer <michaelni@gmx.at>
parent 8b47058c
No related branches found
No related tags found
No related merge requests found
...@@ -924,6 +924,12 @@ void ff_er_frame_end(MpegEncContext *s) ...@@ -924,6 +924,12 @@ void ff_er_frame_end(MpegEncContext *s)
return; 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) { if (s->current_picture.f.motion_val[0] == NULL) {
av_log(s->avctx, AV_LOG_ERROR, "Warning MVs not available\n"); av_log(s->avctx, AV_LOG_ERROR, "Warning MVs not available\n");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment