summaryrefslogtreecommitdiffstats
path: root/video/out/vo.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2016-09-02 14:49:34 +0200
committerwm4 <wm4@nowhere>2016-09-02 14:49:34 +0200
commit4fa6bcbb902d500ca0a1b9d2feeab5a4e5a98345 (patch)
treef4c900cdf5536a1a7373965b49d92943fbb59aed /video/out/vo.c
parent875aeb0f5c0c2853fc85b28727b5b849bee4a74d (diff)
downloadmpv-4fa6bcbb902d500ca0a1b9d2feeab5a4e5a98345.tar.bz2
mpv-4fa6bcbb902d500ca0a1b9d2feeab5a4e5a98345.tar.xz
m_config: add helper function for initializing af/ao/vf/vo suboptions
Normally I'd prefer a bunch of smaller functions with fewer parameters over a single function with a lot of parameters. But future changes will require messing with the parameters in a slightly more complex way, so a combined function will be needed anyway. The now-unused "global" parameter is required for later as well.
Diffstat (limited to 'video/out/vo.c')
-rw-r--r--video/out/vo.c7
1 files changed, 3 insertions, 4 deletions
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;