diff options
author | wm4 <wm4@nowhere> | 2013-12-04 23:04:40 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-12-04 23:13:46 +0100 |
commit | 09bd19e59ee1b4cf9b8db16403a0c3f404af833a (patch) | |
tree | 8fd117e64fbd9762e5096358e45e259231fa29fc /audio/filter | |
parent | 82983970b35ae52236106508e3941d4edc1b5fe8 (diff) | |
download | mpv-09bd19e59ee1b4cf9b8db16403a0c3f404af833a.tar.bz2 mpv-09bd19e59ee1b4cf9b8db16403a0c3f404af833a.tar.xz |
af: remove legacy option parsing hacks
Diffstat (limited to 'audio/filter')
-rw-r--r-- | audio/filter/af.c | 11 | ||||
-rw-r--r-- | audio/filter/af.h | 1 |
2 files changed, 2 insertions, 10 deletions
diff --git a/audio/filter/af.c b/audio/filter/af.c index a48780885b..bb29603d5d 100644 --- a/audio/filter/af.c +++ b/audio/filter/af.c @@ -116,7 +116,6 @@ const struct m_obj_list af_obj_list = { {"force", "format"}, {0} }, - .legacy_hacks = true, // many filters have custom option parsing }; static bool af_config_equals(struct mp_audio *a, struct mp_audio *b) @@ -206,19 +205,13 @@ static struct af_instance *af_create(struct af_stream *s, char *name, struct m_config *config = m_config_from_obj_desc(af, &desc); if (m_config_apply_defaults(config, name, s->opts->af_defs) < 0) goto error; - if (m_config_initialize_obj(config, &desc, &af->priv, &args) < 0) + if (m_config_set_obj_params(config, args) < 0) goto error; + af->priv = config->optstruct; // Initialize the new filter if (af->info->open(af) != AF_OK) goto error; - if (args && af->control) { - // Single option string for old filters - char *opts = (char *)args; // m_config_initialize_obj did this - assert(!af->priv); - if (af->control(af, AF_CONTROL_COMMAND_LINE, opts) <= AF_ERROR) - goto error; - } return af; diff --git a/audio/filter/af.h b/audio/filter/af.h index 77f3bb4945..4e74ffbe4c 100644 --- a/audio/filter/af.h +++ b/audio/filter/af.h @@ -99,7 +99,6 @@ struct af_stream { enum af_control { AF_CONTROL_REINIT = 1, AF_CONTROL_RESET, - AF_CONTROL_COMMAND_LINE, AF_CONTROL_SET_RESAMPLE_RATE, AF_CONTROL_SET_FORMAT, AF_CONTROL_SET_CHANNELS, |