From e4637d6a60af0c414f8953826a51d77e5aee508f Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sun, 13 Dec 2009 13:49:14 +0000 Subject: [PATCH] Show help if no cmd line options are provided at all. This safes the users time to find out which of -h --help -? works. Originally committed as revision 20822 to svn://svn.ffmpeg.org/ffmpeg/trunk --- ffmpeg.c | 3 +++ ffplay.c | 1 + 2 files changed, 4 insertions(+) diff --git a/ffmpeg.c b/ffmpeg.c index a1abd30cfe..2974edd177 100644 --- a/ffmpeg.c +++ b/ffmpeg.c @@ -3985,6 +3985,9 @@ int main(int argc, char **argv) /* parse options */ parse_options(argc, argv, options, opt_output_file); + if(nb_output_files <= 0 && nb_input_files == 0) + show_help(); + /* file converter / grab */ if (nb_output_files <= 0) { fprintf(stderr, "At least one output file must be specified\n"); diff --git a/ffplay.c b/ffplay.c index 5eb5a21165..39d960a7e4 100644 --- a/ffplay.c +++ b/ffplay.c @@ -2539,6 +2539,7 @@ int main(int argc, char **argv) parse_options(argc, argv, options, opt_input_file); if (!input_filename) { + show_help(); fprintf(stderr, "An input file must be specified\n"); exit(1); }