From bfc33da250e4fdb6bb57bdf051ad666570ae985f Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 21 Apr 2018 20:33:58 +0200 Subject: encode: get rid of AVDictionary setter helper Removes a good hunk of weird code. This loses qscale "emulation", some logging, and the fact that duplicate keys for values starting with +/- were added with AV_DICT_APPEND. I don't assign those any importance, even if they are user-visible changes. The new M_OPT_ flag is just so that nothing weird happens for other key-value options, which do not interpret a "help" key specially. --- options/m_option.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'options/m_option.c') diff --git a/options/m_option.c b/options/m_option.c index e0dc1b9729..e0f3dc5c76 100644 --- a/options/m_option.c +++ b/options/m_option.c @@ -1552,6 +1552,9 @@ static int parse_keyvalue_list(struct mp_log *log, const m_option_t *opt, bool append = false; bool full_value = false; + if ((opt->flags & M_OPT_HAVE_HELP) && bstr_equals0(param, "help")) + param = bstr0("help="); + if (bstr_endswith0(name, "-add")) { append = true; } else if (bstr_endswith0(name, "-append")) { -- cgit v1.2.3