avcodec/vp56: Check avctx->error_concealment before enabling EC

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>
(cherry picked from commit 98da63b3f5)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer 2017-03-16 11:20:46 +01:00
parent 232ced7f4e
commit 6c06cd65a2
1 changed files with 1 additions and 1 deletions

View File

@ -706,7 +706,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;
}