diff --git a/libavcodec/librsvgdec.c b/libavcodec/librsvgdec.c index e57070f8e4..6697785026 100644 --- a/libavcodec/librsvgdec.c +++ b/libavcodec/librsvgdec.c @@ -82,8 +82,10 @@ static int librsvg_decode_frame(AVCodecContext *avctx, void *data, int *got_fram crender = cairo_create(image); - cairo_set_source_rgba(crender, 0.0, 0.0, 0.0, 1.0f); - cairo_paint_with_alpha(crender, 0.0f); + cairo_save(crender); + cairo_set_operator(crender, CAIRO_OPERATOR_CLEAR); + cairo_paint(crender); + cairo_restore(crender); cairo_scale(crender, dimensions.width / (double)unscaled_dimensions.width, dimensions.height / (double)unscaled_dimensions.height);