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 <[email protected]>
---
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
_______________________________________________
ffmpeg-devel mailing list
[email protected]
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".