[FFmpeg-cvslog] r20822 - in trunk: ffmpeg.c ffplay.c

michael subversion
Sun Dec 13 14:49:14 CET 2009


Author: michael
Date: Sun Dec 13 14:49:14 2009
New Revision: 20822

Log:
Show help if no cmd line options are provided at all.
This safes the users time to find out which of -h --help -? works.

Modified:
   trunk/ffmpeg.c
   trunk/ffplay.c

Modified: trunk/ffmpeg.c
==============================================================================
--- trunk/ffmpeg.c	Sun Dec 13 11:07:08 2009	(r20821)
+++ trunk/ffmpeg.c	Sun Dec 13 14:49:14 2009	(r20822)
@@ -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");

Modified: trunk/ffplay.c
==============================================================================
--- trunk/ffplay.c	Sun Dec 13 11:07:08 2009	(r20821)
+++ trunk/ffplay.c	Sun Dec 13 14:49:14 2009	(r20822)
@@ -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);
     }



More information about the ffmpeg-cvslog mailing list