Do not pass program_name as argument to show_version(), this allows some
future simplifications. Originally committed as revision 13232 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
a0b3bcd9fe
commit
64555bd9b1
@ -216,7 +216,7 @@ void show_banner(const char *program_name, int program_birth_year)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void show_version(const char *program_name) {
|
void show_version(void) {
|
||||||
/* TODO: add function interface to avutil and avformat avdevice*/
|
/* TODO: add function interface to avutil and avformat avdevice*/
|
||||||
printf("%s " FFMPEG_VERSION "\n", program_name);
|
printf("%s " FFMPEG_VERSION "\n", program_name);
|
||||||
printf("libavutil %d\n"
|
printf("libavutil %d\n"
|
||||||
|
@ -24,6 +24,11 @@
|
|||||||
|
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* program name, defined by the program for show_version().
|
||||||
|
*/
|
||||||
|
extern const char program_name[];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Parses a string and returns its corresponding value as a double.
|
* Parses a string and returns its corresponding value as a double.
|
||||||
* Exits from the application if the string cannot be correctly
|
* Exits from the application if the string cannot be correctly
|
||||||
@ -113,7 +118,7 @@ void show_banner(const char *program_name, int program_birth_year);
|
|||||||
* libraries.
|
* libraries.
|
||||||
* @param program_name name of the program
|
* @param program_name name of the program
|
||||||
*/
|
*/
|
||||||
void show_version(const char *program_name);
|
void show_version(void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Prints the license of the program to stdout. The license depends on
|
* Prints the license of the program to stdout. The license depends on
|
||||||
|
4
ffmpeg.c
4
ffmpeg.c
@ -63,7 +63,7 @@
|
|||||||
|
|
||||||
#undef exit
|
#undef exit
|
||||||
|
|
||||||
static const char program_name[] = "FFmpeg";
|
const char program_name[] = "FFmpeg";
|
||||||
static const int program_birth_year = 2000;
|
static const int program_birth_year = 2000;
|
||||||
|
|
||||||
/* select an input stream for an output stream */
|
/* select an input stream for an output stream */
|
||||||
@ -3758,7 +3758,7 @@ static int opt_bsf(const char *opt, const char *arg)
|
|||||||
|
|
||||||
static void opt_show_version(void)
|
static void opt_show_version(void)
|
||||||
{
|
{
|
||||||
show_version(program_name);
|
show_version();
|
||||||
av_exit(0);
|
av_exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
4
ffplay.c
4
ffplay.c
@ -39,7 +39,7 @@
|
|||||||
|
|
||||||
#undef exit
|
#undef exit
|
||||||
|
|
||||||
static const char program_name[] = "FFplay";
|
const char program_name[] = "FFplay";
|
||||||
static const int program_birth_year = 2003;
|
static const int program_birth_year = 2003;
|
||||||
|
|
||||||
//#define DEBUG_SYNC
|
//#define DEBUG_SYNC
|
||||||
@ -2440,7 +2440,7 @@ static void opt_show_help(void)
|
|||||||
|
|
||||||
static void opt_show_version(void)
|
static void opt_show_version(void)
|
||||||
{
|
{
|
||||||
show_version(program_name);
|
show_version();
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -56,7 +56,7 @@
|
|||||||
|
|
||||||
#undef exit
|
#undef exit
|
||||||
|
|
||||||
static const char program_name[] = "FFserver";
|
const char program_name[] = "FFserver";
|
||||||
static const int program_birth_year = 2000;
|
static const int program_birth_year = 2000;
|
||||||
|
|
||||||
static const OptionDef options[];
|
static const OptionDef options[];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user