summaryrefslogtreecommitdiffstats
path: root/options/options.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-02-06 16:48:52 +0100
committerwm4 <wm4@nowhere>2015-02-06 16:48:52 +0100
commitffe894ec0a73ab6a16ce1ca62800bf1612542107 (patch)
tree2ff3877eb428fa191f318d1285ae96f28cb37bb6 /options/options.c
parent1a38741dce3e32218521cc2b00819dac1ccebc3a (diff)
downloadmpv-ffe894ec0a73ab6a16ce1ca62800bf1612542107.tar.bz2
mpv-ffe894ec0a73ab6a16ce1ca62800bf1612542107.tar.xz
options: change --msg-level option
Make it accept "," as separator, instead of only ":". Do this by using the key-value-list parser. Before this, the option was stored as a string, with the option parser verifying that the option value as correct. Now it's stored pre-parsed, although the log levels still require separate verification and parsing-on-use to some degree (which is why the msg-level option type doesn't go away). Because the internal type changes, the client API "native" type also changes. This could be prevented with some more effort, but I don't think it's worth it - if MPV_FORMAT_STRING is used, it still works the same, just with a different separator on read accesses.
Diffstat (limited to 'options/options.c')
-rw-r--r--options/options.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/options/options.c b/options/options.c
index acc2c99b9e..a7f6ab193f 100644
--- a/options/options.c
+++ b/options/options.c
@@ -105,7 +105,7 @@ const m_option_t mp_opts[] = {
OPT_FLAG("quiet", quiet, CONF_GLOBAL),
OPT_FLAG_STORE("really-quiet", verbose, CONF_GLOBAL | CONF_PRE_PARSE, -10),
OPT_FLAG("terminal", use_terminal, CONF_GLOBAL | CONF_PRE_PARSE),
- OPT_GENERAL(char*, "msg-level", msglevels, CONF_GLOBAL|CONF_PRE_PARSE,
+ OPT_GENERAL(char**, "msg-level", msg_levels, CONF_GLOBAL|CONF_PRE_PARSE,
.type = &m_option_type_msglevels),
OPT_STRING("dump-stats", dump_stats, CONF_GLOBAL | CONF_PRE_PARSE),
OPT_FLAG("msg-color", msg_color, CONF_GLOBAL | CONF_PRE_PARSE),