[FFmpeg-devel] [PATCH] avcodec/pngdec: Mark damaged frames as finished
Paul B Mahol
onemda at gmail.com
Fri Nov 25 16:25:29 EET 2022
On 11/25/22, Andreas Rheinhardt <andreas.rheinhardt at outlook.com> wrote:
> Fixes the deadlock reported in ticket #10071.
>
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
> ---
> libavcodec/pngdec.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/libavcodec/pngdec.c b/libavcodec/pngdec.c
> index 8080094d65..f1cad26c52 100644
> --- a/libavcodec/pngdec.c
> +++ b/libavcodec/pngdec.c
> @@ -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);
> --
> 2.34.1
>
ok
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".
>
More information about the ffmpeg-devel
mailing list