Commit 0c2a18cb authored by Ramiro Polla's avatar Ramiro Polla

Split show_usage() out of show_help().

Originally committed as revision 20904 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 8319aefe
...@@ -3563,12 +3563,17 @@ static void log_callback_help(void* ptr, int level, const char* fmt, va_list vl) ...@@ -3563,12 +3563,17 @@ static void log_callback_help(void* ptr, int level, const char* fmt, va_list vl)
vfprintf(stdout, fmt, vl); vfprintf(stdout, fmt, vl);
} }
static void show_help(void) static void show_usage(void)
{ {
av_log_set_callback(log_callback_help);
printf("Hyper fast Audio and Video encoder\n"); printf("Hyper fast Audio and Video encoder\n");
printf("usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...\n"); printf("usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...\n");
printf("\n"); printf("\n");
}
static void show_help(void)
{
av_log_set_callback(log_callback_help);
show_usage();
show_help_options(options, "Main options:\n", show_help_options(options, "Main options:\n",
OPT_EXPERT | OPT_AUDIO | OPT_VIDEO | OPT_SUBTITLE | OPT_GRAB, 0); OPT_EXPERT | OPT_AUDIO | OPT_VIDEO | OPT_SUBTITLE | OPT_GRAB, 0);
show_help_options(options, "\nAdvanced options:\n", show_help_options(options, "\nAdvanced options:\n",
......
...@@ -2490,11 +2490,16 @@ static const OptionDef options[] = { ...@@ -2490,11 +2490,16 @@ static const OptionDef options[] = {
{ NULL, }, { NULL, },
}; };
static void show_help(void) static void show_usage(void)
{ {
printf("Simple media player\n"); printf("Simple media player\n");
printf("usage: ffplay [options] input_file\n"); printf("usage: ffplay [options] input_file\n");
printf("\n"); printf("\n");
}
static void show_help(void)
{
show_usage();
show_help_options(options, "Main options:\n", show_help_options(options, "Main options:\n",
OPT_EXPERT, 0); OPT_EXPERT, 0);
show_help_options(options, "\nAdvanced options:\n", show_help_options(options, "\nAdvanced options:\n",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment