summaryrefslogtreecommitdiffstats
path: root/audio
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2016-09-05 21:05:47 +0200
committerwm4 <wm4@nowhere>2016-09-05 21:26:39 +0200
commit633eb30cbe0e52879443633760e9460fe5bdcdfa (patch)
tree3eabbb8e58062833905344abc74f59103503ca0f /audio
parent327cb2a06c32f2c05fc266272936080d06103a63 (diff)
downloadmpv-633eb30cbe0e52879443633760e9460fe5bdcdfa.tar.bz2
mpv-633eb30cbe0e52879443633760e9460fe5bdcdfa.tar.xz
options: add automagic hack for handling sub-option deprecations
I decided that it's too much work to convert all the VO/AOs to the new option system manually at once. So here's a shitty hack instead, which achieves almost the same thing. (The only user-visible difference is that e.g. --vo=name:help will list the sub-options normally, instead of showing them as deprecation placeholders. Also, the sub-option parser will verify each option normally, instead of deferring to the global option parser.) Another advantage is that once we drop the deprecated options, converting the remaining things will be easier, because we obviously don't need to add the compatibility hacks. Using this mechanism is separate in the next commit to keep the diff noise down.
Diffstat (limited to 'audio')
-rw-r--r--audio/out/ao.c1
-rw-r--r--audio/out/internal.h1
2 files changed, 2 insertions, 0 deletions
diff --git a/audio/out/ao.c b/audio/out/ao.c
index 3bfa481bc5..cd2b9e8089 100644
--- a/audio/out/ao.c
+++ b/audio/out/ao.c
@@ -110,6 +110,7 @@ static bool get_desc(struct m_obj_desc *dst, int index)
.priv_defaults = ao->priv_defaults,
.options = ao->options,
.global_opts = ao->global_opts,
+ .legacy_prefix = ao->legacy_prefix,
.hidden = ao->encode,
.p = ao,
};
diff --git a/audio/out/internal.h b/audio/out/internal.h
index f9dc073b4d..3115fbfeb7 100644
--- a/audio/out/internal.h
+++ b/audio/out/internal.h
@@ -182,6 +182,7 @@ struct ao_driver {
const void *priv_defaults;
const struct m_option *options;
const struct m_sub_options *global_opts;
+ const char *legacy_prefix;
};
// These functions can be called by AOs.