From a7bbfb137bbcf7ae37c72ace4b68b3ff6fb38a70 Mon Sep 17 00:00:00 2001 From: Sergey Fedorov Date: Fri, 15 Mar 2024 23:13:19 +0800 Subject: [PATCH] librsvgdec.c: unbreak compilation Commit 86ed68420d3b60439d0b7767c53d0fdc1deb7277 introduced a bug which has broken ffmpeg build. Allow it to compile. See: https://trac.macports.org/ticket/68973 --- libavcodec/librsvgdec.c | 2 ++ 1 file changed, 2 insertions(+) diff --git libavcodec/librsvgdec.c libavcodec/librsvgdec.c index c328fbc774..756c26d868 100644 --- libavcodec/librsvgdec.c +++ libavcodec/librsvgdec.c @@ -90,8 +90,10 @@ static int librsvg_decode_frame(AVCodecContext *avctx, AVFrame *frame, goto end; avctx->pix_fmt = AV_PIX_FMT_RGB32; +#if LIBRSVG_MAJOR_VERSION > 2 || LIBRSVG_MAJOR_VERSION == 2 && LIBRSVG_MINOR_VERSION >= 52 viewport.width = dimensions.width; viewport.height = dimensions.height; +#endif ret = ff_get_buffer(avctx, frame, 0); if (ret < 0)