]> rtime.felk.cvut.cz Git - frescor/ffmpeg.git/commitdiff
Simplify show_banner() so that it does not require arguments, similar
authordiego <diego@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Thu, 29 May 2008 08:48:51 +0000 (08:48 +0000)
committerdiego <diego@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Thu, 29 May 2008 08:48:51 +0000 (08:48 +0000)
to what was previously done with show_version().
patch by Stefano Sabatini, stefano.sabatini-lala poste it

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@13526 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b

cmdutils.c
cmdutils.h
ffmpeg.c
ffplay.c
ffserver.c

index 34050c566fa72f02e30f091c1a8ce797e10333f1..5d6204ddaf98de3359d426bc4556afba1325b41e 100644 (file)
@@ -196,7 +196,7 @@ void print_error(const char *filename, int err)
     }
 }
 
-void show_banner(const char *program_name, int program_birth_year)
+void show_banner(void)
 {
     fprintf(stderr, "%s version " FFMPEG_VERSION ", Copyright (c) %d-2008 Fabrice Bellard, et al.\n",
             program_name, program_birth_year);
index 96fa2084115eaf63c897c5d5dce94e3ba548a4aa..981f0faf1eb9788ae02df6189f22f5902abf2f03 100644 (file)
  */
 extern const char program_name[];
 
+/**
+ * program birth year, defined by the program for show_banner()
+ */
+extern const int program_birth_year;
+
 /**
  * Parses a string and returns its corresponding value as a double.
  * Exits from the application if the string cannot be correctly
@@ -107,10 +112,8 @@ void print_error(const char *filename, int err);
  * Prints the program banner to stderr. The banner contents depend on the
  * current version of the repository and of the libav* libraries used by
  * the program.
- * @param program_name name of the program
- * @param program_birth_year year of birth of the program
  */
-void show_banner(const char *program_name, int program_birth_year);
+void show_banner(void);
 
 /**
  * Prints the version of the program to stdout. The version message
index 052d7a67f19e009d2f07da9fb46033a76baea0ff..d3f21d43ceb03e992017bbf700b760a120d4b3b2 100644 (file)
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -64,7 +64,7 @@
 #undef exit
 
 const char program_name[] = "FFmpeg";
-static const int program_birth_year = 2000;
+const int program_birth_year = 2000;
 
 /* select an input stream for an output stream */
 typedef struct AVStreamMap {
@@ -3777,7 +3777,7 @@ int main(int argc, char **argv)
     avformat_opts = av_alloc_format_context();
     sws_opts = sws_getContext(16,16,0, 16,16,0, sws_flags, NULL,NULL,NULL);
 
-    show_banner(program_name, program_birth_year);
+    show_banner();
     if (argc <= 1) {
         show_help();
         av_exit(1);
index 62915d2e658fac455631e2a2ecbae8127120b86e..204d64eb905d0cbece4f23c03004b83aec12c465 100644 (file)
--- a/ffplay.c
+++ b/ffplay.c
@@ -40,7 +40,7 @@
 #undef exit
 
 const char program_name[] = "FFplay";
-static const int program_birth_year = 2003;
+const int program_birth_year = 2003;
 
 //#define DEBUG_SYNC
 
@@ -2509,7 +2509,7 @@ int main(int argc, char **argv)
     avdevice_register_all();
     av_register_all();
 
-    show_banner(program_name, program_birth_year);
+    show_banner();
 
     parse_options(argc, argv, options, opt_input_file);
 
index b9718d843bc8107e722da43128fb93d2f6895ece..e12e98e3fee4f1ace5260812b29416109ef7202d 100644 (file)
@@ -57,7 +57,7 @@
 #undef exit
 
 const char program_name[] = "FFserver";
-static const int program_birth_year = 2000;
+const int program_birth_year = 2000;
 
 static const OptionDef options[];
 
@@ -4361,7 +4361,7 @@ int main(int argc, char **argv)
 
     av_register_all();
 
-    show_banner(program_name, program_birth_year);
+    show_banner();
 
     config_filename = "/etc/ffserver.conf";