summaryrefslogtreecommitdiffstats
path: root/options
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-12-18 15:43:31 +0100
committerwm4 <wm4@nowhere>2013-12-20 21:07:57 +0100
commit591a6722d29ca21e8bb62dbd01792590e8548dec (patch)
tree49b2c9091141ba868ac0d1f70cf00d833895e4db /options
parent78292058ccf3fb827c9acc8ab3f616fa78a7a1e5 (diff)
downloadmpv-591a6722d29ca21e8bb62dbd01792590e8548dec.tar.bz2
mpv-591a6722d29ca21e8bb62dbd01792590e8548dec.tar.xz
msg: change hack to silence command line pre-parse error messages
mp_msg_levels[] will go away.
Diffstat (limited to 'options')
-rw-r--r--options/parse_commandline.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/options/parse_commandline.c b/options/parse_commandline.c
index 182844ccc9..eaa7f4f162 100644
--- a/options/parse_commandline.c
+++ b/options/parse_commandline.c
@@ -265,8 +265,6 @@ err_out:
return ret;
}
-extern int mp_msg_levels[];
-
/* Parse some command line options early before main parsing.
* --no-config prevents reading configuration files (otherwise done before
* command line parsing), and --really-quiet suppresses messages printed
@@ -275,8 +273,7 @@ extern int mp_msg_levels[];
void m_config_preparse_command_line(m_config_t *config, int argc, char **argv)
{
// Hack to shut up parser error messages
- int msg_lvl_backup = mp_msg_levels[MSGT_CFGPARSER];
- mp_msg_levels[MSGT_CFGPARSER] = -11;
+ mp_msg_mute = true;
struct parse_state p = {config, argc, argv};
while (split_opt_silent(&p) == 0) {
@@ -290,5 +287,5 @@ void m_config_preparse_command_line(m_config_t *config, int argc, char **argv)
}
}
- mp_msg_levels[MSGT_CFGPARSER] = msg_lvl_backup;
+ mp_msg_mute = false;
}