diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-01-11 04:44:20 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-01-19 16:18:01 +0100 |
commit | 68a0477bc0af026db971ddba22541029a9e8715b (patch) | |
tree | 9b21fe63e46a1aedd03cbf58b1f8832972e1fbe9 /libavcodec | |
parent | ccf0cd967d32084978a4346d608b44aec56b9d25 (diff) | |
download | ffmpeg-68a0477bc0af026db971ddba22541029a9e8715b.tar.gz |
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: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 23318a57358358e7a4dc551e830e4503f0638cfe)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/error_resilience.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libavcodec/error_resilience.c b/libavcodec/error_resilience.c index 01f7424904..2b6bc42ade 100644 --- a/libavcodec/error_resilience.c +++ b/libavcodec/error_resilience.c @@ -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"); |