Unified · Split
| @@ -435,12 +435,6 @@ static av_cold int ddagrab_init(AVFilterContext *avctx) · 434 unmodified lines | ||
| 435 | 435 | dda->mouse_x = -1; |
| 436 | 436 | dda->mouse_y = -1; |
| 437 | 437 | |
| 438 | − if (dda->draw_mouse) { | |
| 439 | − ret = init_render_resources(avctx); | |
| 440 | − if (ret < 0) | |
| 441 | − goto fail; | |
| 442 | − } | |
| 443 | − | |
| 444 | 438 | return 0; |
| 445 | 439 | fail: |
| 446 | 440 | ddagrab_uninit(avctx); |
| @@ -723,6 +717,12 @@ static int ddagrab_config_props(AVFilterLink *outlink) · 276 unmodified lines | ||
| 723 | 717 | dda->width -= FFMAX(dda->width - dda->raw_width + dda->offset_x, 0); |
| 724 | 718 | dda->height -= FFMAX(dda->height - dda->raw_height + dda->offset_y, 0); |
| 725 | 719 | |
| 720 | + if (dda->draw_mouse) { | |
| 721 | + ret = init_render_resources(avctx); | |
| 722 | + if (ret < 0) | |
| 723 | + return ret; | |
| 724 | + } | |
| 725 | + | |
| 726 | 726 | ret = init_hwframes_ctx(avctx); |
| 727 | 727 | if (ret < 0) |
| 728 | 728 | return ret; |