1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

avfilter/vsrc_ddagrab: fix mouse cursor render init

This commit is contained in:
Timo Rothenpieler 2022-08-05 14:02:44 +02:00
parent 2345b4eb9c
commit fbf87a46ab

View File

@ -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;