1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-21 10:55:51 +02:00

avcodec/pngdec: Mark damaged frames as finished

Fixes the deadlock reported in ticket #10071.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt 2022-11-25 14:24:08 +01:00
parent e0bc798ce5
commit 0c5af908c1

View File

@ -1362,8 +1362,10 @@ exit_loop:
return 0;
}
if (percent_missing(s) > avctx->discard_damaged_percentage)
return AVERROR_INVALIDDATA;
if (percent_missing(s) > avctx->discard_damaged_percentage) {
ret = AVERROR_INVALIDDATA;
goto fail;
}
if (s->bits_per_pixel <= 4)
handle_small_bpp(s, p);