summaryrefslogtreecommitdiffstats
path: root/common/encode_lavc.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 /common/encode_lavc.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 'common/encode_lavc.c')
-rw-r--r--common/encode_lavc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/common/encode_lavc.c b/common/encode_lavc.c
index 5fbad39d44..2ae9eef6bd 100644
--- a/common/encode_lavc.c
+++ b/common/encode_lavc.c
@@ -39,13 +39,13 @@ const struct m_sub_options encode_config = {
.opts = (const m_option_t[]) {
OPT_STRING("o", file, M_OPT_FIXED | CONF_NOCFG | CONF_PRE_PARSE | M_OPT_FILE),
OPT_STRING("of", format, M_OPT_FIXED),
- OPT_STRINGLIST("ofopts*", fopts, M_OPT_FIXED),
+ OPT_STRINGLIST("ofopts", fopts, M_OPT_FIXED),
OPT_FLOATRANGE("ofps", fps, M_OPT_FIXED, 0.0, 1000000.0),
OPT_FLOATRANGE("omaxfps", maxfps, M_OPT_FIXED, 0.0, 1000000.0),
OPT_STRING("ovc", vcodec, M_OPT_FIXED),
- OPT_STRINGLIST("ovcopts*", vopts, M_OPT_FIXED),
+ OPT_STRINGLIST("ovcopts", vopts, M_OPT_FIXED),
OPT_STRING("oac", acodec, M_OPT_FIXED),
- OPT_STRINGLIST("oacopts*", aopts, M_OPT_FIXED),
+ OPT_STRINGLIST("oacopts", aopts, M_OPT_FIXED),
OPT_FLAG("oharddup", harddup, M_OPT_FIXED),
OPT_FLOATRANGE("ovoffset", voffset, M_OPT_FIXED, -1000000.0, 1000000.0),
OPT_FLOATRANGE("oaoffset", aoffset, M_OPT_FIXED, -1000000.0, 1000000.0),