> On Jan 10, 2025, at 09:24, Lu Yao <ya...@kylinos.cn> wrote:
> 
> When compiling with an earlier version of lbrsvg, the following error
> occurs:
>  "src/libavcodec/librsvgdec.c: In function 'librsvg_decode_frame'"
>  "src/libavcodec/librsvgdec.c:93:5: error: 'viewport' undeclared"
> 
> Fixes: 86ed68420d3b ("avcodec/librsvgdec: fix memory leaks and deprecated 
> functions")
> Signed-off-by: Lu Yao <ya...@kylinos.cn>
> ---
> libavcodec/librsvgdec.c | 2 ++
> 1 file changed, 2 insertions(+)
> 
> diff --git a/libavcodec/librsvgdec.c b/libavcodec/librsvgdec.c
> index c328fbc774..756c26d868 100644
> --- a/libavcodec/librsvgdec.c
> +++ b/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)
> -- 
> 2.25.1

LGTM.

> 
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 
> To unsubscribe, visit link above, or email
> ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to