summaryrefslogtreecommitdiffstats
path: root/video
diff options
context:
space:
mode:
Diffstat (limited to 'video')
-rw-r--r--video/filter/vf.c8
-rw-r--r--video/out/vo.c7
2 files changed, 7 insertions, 8 deletions
diff --git a/video/filter/vf.c b/video/filter/vf.c
index b632314426..93b886e69c 100644
--- a/video/filter/vf.c
+++ b/video/filter/vf.c
@@ -255,10 +255,10 @@ static struct vf_instance *vf_open(struct vf_chain *c, const char *name,
.out_pool = talloc_steal(vf, mp_image_pool_new(16)),
.chain = c,
};
- struct m_config *config = m_config_from_obj_desc(vf, vf->log, &desc);
- if (m_config_apply_defaults(config, name, c->opts->vf_defs) < 0)
- goto error;
- if (m_config_set_obj_params(config, args) < 0)
+ struct m_config *config =
+ m_config_from_obj_desc_and_args(vf, vf->log, c->global, &desc,
+ name, c->opts->vf_defs, args);
+ if (!config)
goto error;
vf->priv = config->optstruct;
int retcode = vf->info->open(vf);
diff --git a/video/out/vo.c b/video/out/vo.c
index 53525b4049..e37acb1242 100644
--- a/video/out/vo.c
+++ b/video/out/vo.c
@@ -248,10 +248,9 @@ static struct vo *vo_create(bool probing, struct mpv_global *global,
mp_input_set_mouse_transform(vo->input_ctx, NULL, NULL);
if (vo->driver->encode != !!vo->encode_lavc_ctx)
goto error;
- vo->config = m_config_from_obj_desc(vo, vo->log, &desc);
- if (m_config_apply_defaults(vo->config, name, vo->opts->vo_defs) < 0)
- goto error;
- if (m_config_set_obj_params(vo->config, args) < 0)
+ vo->config = m_config_from_obj_desc_and_args(vo, vo->log, global, &desc,
+ name, vo->opts->vo_defs, args);
+ if (!vo->config)
goto error;
vo->priv = vo->config->optstruct;