mirror of https://github.com/mpv-player/mpv
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.
This commit is contained in:
parent
f113e20794
commit
5404fa26f9
17
mplayer.c
17
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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue