diff options
author | wm4 <wm4@nowhere> | 2015-04-13 20:30:17 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-04-13 20:30:17 +0200 |
commit | 9e0cd3b3e75e0970b1d6eb2cbcba770fc5112f9e (patch) | |
tree | d41daa6cf1d696cdef69c6f6b686dcd51317345c | |
parent | 3823d5eb7efad4d35c5c8e49f95656ec781c5584 (diff) | |
download | mpv-9e0cd3b3e75e0970b1d6eb2cbcba770fc5112f9e.tar.bz2 mpv-9e0cd3b3e75e0970b1d6eb2cbcba770fc5112f9e.tar.xz |
options: don't let --vf-clr etc. take an argument
It was ignored before. Passing an argument makes no sense, and might be
mistaken for some form of --vf-del, so complain about it.
This also affects --af-clr and the vf/af commands.
-rw-r--r-- | options/m_option.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/options/m_option.c b/options/m_option.c index 165656500d..b5c865b8b4 100644 --- a/options/m_option.c +++ b/options/m_option.c @@ -2934,6 +2934,11 @@ static int parse_obj_settings_list(struct mp_log *log, const m_option_t *opt, } if (op == OP_CLR) { + if (param.len) { + mp_err(log, "Option %.*s: -clr does not take an argument.\n", + BSTR_P(name)); + return M_OPT_INVALID; + } if (dst) free_obj_settings_list(dst); return 0; |