diff options
author | wm4 <wm4@nowhere> | 2016-09-02 14:49:34 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2016-09-02 14:49:34 +0200 |
commit | 4fa6bcbb902d500ca0a1b9d2feeab5a4e5a98345 (patch) | |
tree | f4c900cdf5536a1a7373965b49d92943fbb59aed /video/filter | |
parent | 875aeb0f5c0c2853fc85b28727b5b849bee4a74d (diff) | |
download | mpv-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/filter')
-rw-r--r-- | video/filter/vf.c | 8 |
1 files changed, 4 insertions, 4 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); |