aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-12-20 22:03:25 +0100
committerMichael Niedermayer <michaelni@gmx.at>2011-12-20 22:23:12 +0100
commit452406bd5bbf21a0da7104e6edca9c6e70636511 (patch)
treeec57dcd3ad61e06d903b8a754384cb9fa769d9e4
parentb0aaf304a778f0a49d42c032aa83efa62c3291c4 (diff)
downloadffmpeg-452406bd5bbf21a0da7104e6edca9c6e70636511.tar.gz
ff*: Fix duplicatedly printed version info with -version
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--avconv.c2
-rw-r--r--cmdutils.c6
-rw-r--r--cmdutils.h2
-rw-r--r--ffmpeg.c2
-rw-r--r--ffplay.c2
-rw-r--r--ffprobe.c2
-rw-r--r--ffserver.c2
7 files changed, 11 insertions, 7 deletions
diff --git a/avconv.c b/avconv.c
index 0fadcc9b2c..77276c1954 100644
--- a/avconv.c
+++ b/avconv.c
@@ -4392,7 +4392,7 @@ int main(int argc, char **argv)
av_register_all();
avformat_network_init();
- show_banner();
+ show_banner(argc, argv, options);
/* parse options */
parse_options(&o, argc, argv, options, opt_output_file);
diff --git a/cmdutils.c b/cmdutils.c
index 65628fcc86..4a5421b770 100644
--- a/cmdutils.c
+++ b/cmdutils.c
@@ -582,8 +582,12 @@ static void print_all_libs_info(int flags, int level)
PRINT_LIB_INFO(postproc, POSTPROC, flags, level);
}
-void show_banner(void)
+void show_banner(int argc, char **argv, const OptionDef *options)
{
+ int idx = locate_option(argc, argv, options, "version");
+ if (idx)
+ return;
+
av_log(NULL, AV_LOG_INFO, "%s version " FFMPEG_VERSION ", Copyright (c) %d-%d the FFmpeg developers\n",
program_name, program_birth_year, this_year);
av_log(NULL, AV_LOG_INFO, " built on %s %s with %s %s\n",
diff --git a/cmdutils.h b/cmdutils.h
index 03080b5216..a682c96d79 100644
--- a/cmdutils.h
+++ b/cmdutils.h
@@ -245,7 +245,7 @@ void print_error(const char *filename, int err);
* current version of the repository and of the libav* libraries used by
* the program.
*/
-void show_banner(void);
+void show_banner(int argc, char **argv, const OptionDef *options);
/**
* Print the version of the program to stdout. The version message
diff --git a/ffmpeg.c b/ffmpeg.c
index 6ef8c150fb..75274db17a 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -4857,7 +4857,7 @@ int main(int argc, char **argv)
av_register_all();
avformat_network_init();
- show_banner();
+ show_banner(argc, argv, options);
term_init();
diff --git a/ffplay.c b/ffplay.c
index b5d9f0f0d0..8734b65373 100644
--- a/ffplay.c
+++ b/ffplay.c
@@ -3165,7 +3165,7 @@ int main(int argc, char **argv)
init_opts();
- show_banner();
+ show_banner(argc, argv, options);
parse_options(NULL, argc, argv, options, opt_input_file);
diff --git a/ffprobe.c b/ffprobe.c
index 577fed3e39..71f7ded6e7 100644
--- a/ffprobe.c
+++ b/ffprobe.c
@@ -1252,7 +1252,7 @@ int main(int argc, char **argv)
avdevice_register_all();
#endif
- show_banner();
+ show_banner(argc, argv, options);
parse_options(NULL, argc, argv, options, opt_input_file);
if (!input_filename) {
diff --git a/ffserver.c b/ffserver.c
index 0a4f889e6a..4a9cc62a16 100644
--- a/ffserver.c
+++ b/ffserver.c
@@ -4673,7 +4673,7 @@ int main(int argc, char **argv)
av_register_all();
avformat_network_init();
- show_banner();
+ show_banner(argc, argv, options);
my_program_name = argv[0];
my_program_dir = getcwd(0, 0);