summaryrefslogtreecommitdiffstats
path: root/options/options.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2017-06-26 21:07:00 +0200
committerwm4 <wm4@nowhere>2017-06-26 21:07:00 +0200
commit50008adf4af5360f87109d6264aa77ac82f2a80a (patch)
tree051b3b5fa57226e50dfb72cdce00f5d4ba643dbc /options/options.c
parent6f80a694d3de98ce9ddabf1c188865fc6be69710 (diff)
downloadmpv-50008adf4af5360f87109d6264aa77ac82f2a80a.tar.bz2
mpv-50008adf4af5360f87109d6264aa77ac82f2a80a.tar.xz
options: handle suffixes like -add in a more generic way
This affects options like --vf or --display-tags. These used a "*" suffix to match all options starting with a specific name, and handled the rest in the option parser. Change this to remove the "*" special case, and require every option parser to declare a list of allowed suffixes via m_option_type.actions. The new way is conceptually simpler, because we don't have to account for the "*" in a bunch of places anymore, and instead everything is centrally handled in the CLI part of the option parser, where it's actually needed. It automatically enables suffixes like -add for a bunch of other stringlist options.
Diffstat (limited to 'options/options.c')
-rw-r--r--options/options.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/options/options.c b/options/options.c
index 1937a7fe65..a803dccf5d 100644
--- a/options/options.c
+++ b/options/options.c
@@ -367,7 +367,7 @@ const m_option_t mp_opts[] = {
OPT_CHOICE_OR_INT("hls-bitrate", hls_bitrate, 0, 0, INT_MAX,
({"no", -1}, {"min", 0}, {"max", INT_MAX})),
- OPT_STRINGLIST("display-tags*", display_tags, 0),
+ OPT_STRINGLIST("display-tags", display_tags, 0),
#if HAVE_CDDA
OPT_SUBSTRUCT("cdda", stream_cdda_opts, stream_cdda_conf, 0),
@@ -414,9 +414,9 @@ const m_option_t mp_opts[] = {
// ------------------------- codec/vfilter options --------------------
OPT_SETTINGSLIST("af-defaults", af_defs, 0, &af_obj_list, ),
- OPT_SETTINGSLIST("af*", af_settings, 0, &af_obj_list, ),
+ OPT_SETTINGSLIST("af", af_settings, 0, &af_obj_list, ),
OPT_SETTINGSLIST("vf-defaults", vf_defs, 0, &vf_obj_list, ),
- OPT_SETTINGSLIST("vf*", vf_settings, 0, &vf_obj_list, ),
+ OPT_SETTINGSLIST("vf", vf_settings, 0, &vf_obj_list, ),
OPT_CHOICE("deinterlace", deinterlace, 0,
({"auto", -1},