summaryrefslogtreecommitdiffstats
path: root/mplayer.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2012-07-29 23:30:58 +0200
committerwm4 <wm4@nowhere>2012-07-30 01:49:26 +0200
commit5404fa26f9271ae6f280a659770021b23e49f409 (patch)
tree2201c3bbf06d9f4e6e1d7e672db6c08e95ef77a7 /mplayer.c
parentf113e20794960881f1ce621e69131e6bb831ce36 (diff)
downloadmpv-5404fa26f9271ae6f280a659770021b23e49f409.tar.bz2
mpv-5404fa26f9271ae6f280a659770021b23e49f409.tar.xz
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.
Diffstat (limited to 'mplayer.c')
-rw-r--r--mplayer.c17
1 files 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);
}