diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-11-18 22:51:54 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-11-18 23:02:46 +0100 |
commit | e8fed4d3314cdf0cf4134844a1acf5798b205cb8 (patch) | |
tree | 2dac4f48516c0ffd5275e5323cc43e197d3c793d /libavcodec | |
parent | 8a03a60b4af46c001d5686b9303f48f6c4ebdf6c (diff) | |
download | ffmpeg-e8fed4d3314cdf0cf4134844a1acf5798b205cb8.tar.gz |
error concealment: check that references are frames and not fields.
frames cant have field references.
Fixes a deadlock
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/error_resilience.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/error_resilience.c b/libavcodec/error_resilience.c index 7ddc5ac052..01f7424904 100644 --- a/libavcodec/error_resilience.c +++ b/libavcodec/error_resilience.c @@ -66,6 +66,10 @@ static void decode_mb(MpegEncContext *s, int ref) av_log(s->avctx, AV_LOG_DEBUG, "Reference not available for error concealing\n"); ref = 0; } + if ((h->ref_list[0][ref].f.reference&3) != 3) { + av_log(s->avctx, AV_LOG_DEBUG, "Reference invalid\n"); + return; + } fill_rectangle(&s->current_picture.f.ref_index[0][4 * h->mb_xy], 2, 2, 2, ref, 1); fill_rectangle(&h->ref_cache[0][scan8[0]], 4, 4, 8, ref, 1); |