From 306136a287b767d33f20678b34a60d6fef60fe9f Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 12 Dec 2012 23:02:03 +0100 Subject: options: handle -v during pre-parsing command line Otherwise -v is honored too late, and some output will be missing. In particular, this prevented printing of the libav* library versions. --- core/parser-mpcmd.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'core') diff --git a/core/parser-mpcmd.c b/core/parser-mpcmd.c index 8007344a26..bc7499fd83 100644 --- a/core/parser-mpcmd.c +++ b/core/parser-mpcmd.c @@ -255,11 +255,6 @@ bool m_config_parse_mp_command_line(m_config_t *config, struct playlist *files, continue; } - if (bstrcmp0(p.arg, "v") == 0) { - verbose++; - continue; - } - if (mode == LOCAL) { MP_TARRAY_APPEND(NULL, local_params, local_params_count, (struct playlist_param) {p.arg, p.param}); @@ -351,6 +346,8 @@ void m_config_preparse_command_line(m_config_t *config, int argc, char **argv) // Option parsing errors will be handled later as well. if (p.mp_opt->flags & M_OPT_PRE_PARSE) m_config_set_option(config, p.arg, p.param); + if (bstrcmp0(p.arg, "v") == 0) + verbose++; } } -- cgit v1.2.3