From 5404fa26f9271ae6f280a659770021b23e49f409 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sun, 29 Jul 2012 23:30:58 +0200 Subject: mplayer: do not print version by default The msg level for the version output is elevated to verbose. When running mplayer without arguments, the version is printed a second time (with default msg level) before the help output. --- mplayer.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/mplayer.c b/mplayer.c index 9d4078c4b3..b9de368d95 100644 --- a/mplayer.c +++ b/mplayer.c @@ -3683,13 +3683,10 @@ static int select_audio(demuxer_t *demuxer, int audio_id, char **audio_lang) return demuxer->audio->id; } -static void print_version(void) +static void print_version(int always) { - mp_msg(MSGT_CPLAYER, MSGL_INFO, "%s (C) 2000-2012\n", mplayer_version); - - /* Test for CPU capabilities (and corresponding OS support) for optimizing */ - GetCpuCaps(&gCpuCaps); - print_libav_versions(); + mp_msg(MSGT_CPLAYER, always ? MSGL_INFO : MSGL_V, + "%s (C) 2000-2012\n", mplayer_version); } #ifdef PTW32_STATIC_LIB @@ -3761,6 +3758,11 @@ int main(int argc, char *argv[]) // Preparse the command line m_config_preparse_command_line(mpctx->mconfig, argc, argv, &verbose); + print_version(false); + print_libav_versions(); + + GetCpuCaps(&gCpuCaps); + #if (defined(__MINGW32__) || defined(__CYGWIN__)) && defined(CONFIG_WIN32DLL) set_path_env(); #endif @@ -3791,8 +3793,6 @@ int main(int argc, char *argv[]) } } - print_version(); - #if defined(__MINGW32__) || defined(__CYGWIN__) { HMODULE kernel32 = GetModuleHandle("Kernel32.dll"); @@ -3895,6 +3895,7 @@ int main(int argc, char *argv[]) if (!mpctx->filename && !opts->player_idle_mode) { // no file/vcd/dvd -> show HELP: + print_version(true); mp_msg(MSGT_CPLAYER, MSGL_INFO, "%s", mp_gtext(help_text)); exit_player_with_rc(mpctx, EXIT_NONE, 0); } -- cgit v1.2.3