]> git.sesse.net Git - ffmpeg/commitdiff
avcodec/vp56: Check avctx->error_concealment before enabling EC
authorMichael Niedermayer <michael@niedermayer.cc>
Thu, 16 Mar 2017 10:20:46 +0000 (11:20 +0100)
committerMichael Niedermayer <michael@niedermayer.cc>
Mon, 20 Mar 2017 00:33:08 +0000 (01:33 +0100)
Fixes timeout with 847/clusterfuzz-testcase-5291877358108672
Fixes timeout with 850/clusterfuzz-testcase-5721296509861888

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/vp56.c

index 4751840943ecddf0aa675d1408acbbe63e6efa4c..b69fe6c176d1c8fed1d8d707d4f4ff5e1fc52bec 100644 (file)
@@ -712,7 +712,7 @@ static int ff_vp56_decode_mbs(AVCodecContext *avctx, void *data,
                 int ret = vp56_decode_mb(s, mb_row, mb_col, is_alpha);
                 if (ret < 0) {
                     damaged = 1;
-                    if (!s->have_undamaged_frame) {
+                    if (!s->have_undamaged_frame || !avctx->error_concealment) {
                         s->discard_frame = 1;
                         return AVERROR_INVALIDDATA;
                     }