diff options
author | wm4 <wm4@nowhere> | 2015-02-06 15:42:12 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-02-06 15:42:12 +0100 |
commit | 1a38741dce3e32218521cc2b00819dac1ccebc3a (patch) | |
tree | 6ae7700c29449f1a93a2f7509f49302d5f9f3b22 | |
parent | c9558e560eaead8ef3d73c8a3e4cdb5c4ffbfef4 (diff) | |
download | mpv-1a38741dce3e32218521cc2b00819dac1ccebc3a.tar.bz2 mpv-1a38741dce3e32218521cc2b00819dac1ccebc3a.tar.xz |
options: allow ":" as separator in key-value lists
Before this, unquoted occurrences of ":" lead to parsing errors. There's
no reason to reject it, especially since the traditional MPlayer syntax
uses ":" as separator. (Which is also the reason why ":" was rejected
before: the parser shares this code for handling splitting/quoting, and
we merely checked explicitly whether the option was split on ",".)
-rw-r--r-- | options/m_option.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/options/m_option.c b/options/m_option.c index de65587884..74d6509111 100644 --- a/options/m_option.c +++ b/options/m_option.c @@ -1409,7 +1409,7 @@ static int parse_keyvalue_list(struct mp_log *log, const m_option_t *opt, MP_TARRAY_APPEND(NULL, lst, num, bstrto0(NULL, val)); } - if (!bstr_eatstart0(¶m, ",")) + if (!bstr_eatstart0(¶m, ",") && !bstr_eatstart0(¶m, ":")) break; } if (dst) |