Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-11-19 01:51:54 +0400
committerMichael Niedermayer <michaelni@gmx.at>2012-11-19 02:02:46 +0400
commite8fed4d3314cdf0cf4134844a1acf5798b205cb8 (patch)
tree2dac4f48516c0ffd5275e5323cc43e197d3c793d /libavcodec/error_resilience.c
parent8a03a60b4af46c001d5686b9303f48f6c4ebdf6c (diff)
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/error_resilience.c')
-rw-r--r--libavcodec/error_resilience.c4
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);