aboutsummaryrefslogtreecommitdiffstats
path: root/libavfilter
diff options
context:
space:
mode:
authorTimo Rothenpieler <timo@rothenpieler.org>2022-08-05 14:02:44 +0200
committerTimo Rothenpieler <timo@rothenpieler.org>2022-08-05 14:07:47 +0200
commitfbf87a46ab97cf487141002d660bf4ed9379e334 (patch)
treeab2eda8c2c1d29e169ef67357dca82e2408a4378 /libavfilter
parent2345b4eb9c430946ff1ca04d9ee55168336fd1cb (diff)
downloadffmpeg-fbf87a46ab97cf487141002d660bf4ed9379e334.tar.gz
avfilter/vsrc_ddagrab: fix mouse cursor render init
Diffstat (limited to 'libavfilter')
-rw-r--r--libavfilter/vsrc_ddagrab.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/libavfilter/vsrc_ddagrab.c b/libavfilter/vsrc_ddagrab.c
index 98daec1d04..0543e889ad 100644
--- a/libavfilter/vsrc_ddagrab.c
+++ b/libavfilter/vsrc_ddagrab.c
@@ -435,12 +435,6 @@ static av_cold int ddagrab_init(AVFilterContext *avctx)
dda->mouse_x = -1;
dda->mouse_y = -1;
- if (dda->draw_mouse) {
- ret = init_render_resources(avctx);
- if (ret < 0)
- goto fail;
- }
-
return 0;
fail:
ddagrab_uninit(avctx);
@@ -723,6 +717,12 @@ static int ddagrab_config_props(AVFilterLink *outlink)
dda->width -= FFMAX(dda->width - dda->raw_width + dda->offset_x, 0);
dda->height -= FFMAX(dda->height - dda->raw_height + dda->offset_y, 0);
+ if (dda->draw_mouse) {
+ ret = init_render_resources(avctx);
+ if (ret < 0)
+ return ret;
+ }
+
ret = init_hwframes_ctx(avctx);
if (ret < 0)
return ret;