From 9e0cd3b3e75e0970b1d6eb2cbcba770fc5112f9e Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 13 Apr 2015 20:30:17 +0200 Subject: [PATCH] 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. --- options/m_option.c | 5 +++++ 1 file changed, 5 insertions(+) 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;