diff options
author | wm4 <wm4@nowhere> | 2013-12-04 00:01:38 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-12-04 00:07:40 +0100 |
commit | 437ecc5cad9d31899a0b0bf3e9c696bc61586621 (patch) | |
tree | 2658f50f9b0682d91aca34bec69c5132f549659e /video/filter/vf.c | |
parent | 079e0e796350a3df64c03619b7593e1d934bf321 (diff) | |
download | mpv-437ecc5cad9d31899a0b0bf3e9c696bc61586621.tar.bz2 mpv-437ecc5cad9d31899a0b0bf3e9c696bc61586621.tar.xz |
video/filter: remove legacy option handling hacks
All filters now either use the generic option parser, or don't have
options. This finally finishes a transition started in 2003 (see git
commit 33b62af94760186c).
Why are MPlayer devs so monumentally lazy? Sorry, but this takes the
cake. You had 10 years.
Diffstat (limited to 'video/filter/vf.c')
-rw-r--r-- | video/filter/vf.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/video/filter/vf.c b/video/filter/vf.c index 7242f47514..c88621afdb 100644 --- a/video/filter/vf.c +++ b/video/filter/vf.c @@ -138,7 +138,6 @@ static bool get_desc(struct m_obj_desc *dst, int index) const struct m_obj_list vf_obj_list = { .get_desc = get_desc, .description = "video filters", - .legacy_hacks = true, // some filters have custom option parsing }; int vf_control(struct vf_instance *vf, int cmd, void *arg) @@ -251,11 +250,10 @@ static struct vf_instance *vf_open(struct MPOpts *opts, vf_instance_t *next, struct m_config *config = m_config_from_obj_desc(vf, &desc); if (m_config_apply_defaults(config, name, opts->vf_defs) < 0) goto error; - void *priv = NULL; - if (m_config_initialize_obj(config, &desc, &priv, &args) < 0) + if (m_config_set_obj_params(config, args) < 0) goto error; - vf->priv = priv; - int retcode = vf->info->open(vf, (char *)args); + vf->priv = config->optstruct; + int retcode = vf->info->open(vf); if (retcode < 1) goto error; return vf; |