mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2026-02-04 14:30:55 +08:00
avcodec/librsvgdec: fix compilation with librsvg 2.50.3
This fixes compilation with librsvg 2.50.3: error: viewport undeclared This was a regression since commit86ed68420d. Fixes #10722. Reviewed-by: Leo Izen <leo.izen@gmail.com> (cherry picked from commit9ee7796c54) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
committed by
Michael Niedermayer
parent
dc2728474e
commit
483015d6ce
@@ -90,8 +90,6 @@ static int librsvg_decode_frame(AVCodecContext *avctx, AVFrame *frame,
|
||||
goto end;
|
||||
|
||||
avctx->pix_fmt = AV_PIX_FMT_RGB32;
|
||||
viewport.width = dimensions.width;
|
||||
viewport.height = dimensions.height;
|
||||
|
||||
ret = ff_get_buffer(avctx, frame, 0);
|
||||
if (ret < 0)
|
||||
@@ -116,6 +114,8 @@ static int librsvg_decode_frame(AVCodecContext *avctx, AVFrame *frame,
|
||||
cairo_restore(crender);
|
||||
|
||||
#if LIBRSVG_MAJOR_VERSION > 2 || LIBRSVG_MAJOR_VERSION == 2 && LIBRSVG_MINOR_VERSION >= 52
|
||||
viewport.width = dimensions.width;
|
||||
viewport.height = dimensions.height;
|
||||
gret = rsvg_handle_render_document(handle, crender, &viewport, &error);
|
||||
#else
|
||||
cairo_scale(crender, dimensions.width / (double)unscaled_dimensions.width,
|
||||
|
||||
Reference in New Issue
Block a user