[FFmpeg-devel] [PATCH] Remove unnecessary calls to show_help()

Stefano Sabatini stefano.sabatini-lala
Sat Nov 8 17:27:17 CET 2008


On date Wednesday 2008-10-29 23:55:22 +0100, Stefano Sabatini encoded:
> On date Wednesday 2008-10-29 00:03:17 +0100, Diego Biurrun encoded:
> > On Tue, Oct 28, 2008 at 09:15:16PM +0100, Stefano Sabatini wrote:
> > > 
> > > --- ffplay.c	(revision 15731)
> > > +++ ffplay.c	(working copy)
> > > @@ -2553,7 +2553,7 @@
> > >      if (!input_filename) {
> > > -        show_help();
> > > +        fprintf(stderr, "Must supply at least one input file\n");
> > 
> > You must supply at least one input file.
> 
> So I suppose also the ffmpeg.c messages has to be fixed, also since
> ffplay only take one input file I changed the message accordingly.
> 
> Check the patch below, and yes the ffmpeg.c messages fix would go in a
> separate commit.
> 
> Regards.
> -- 
> FFmpeg = Fostering Forgiving Mega Pitiful Elastic Generator

> Index: ffmpeg.c
> ===================================================================
> --- ffmpeg.c	(revision 15736)
> +++ ffmpeg.c	(working copy)
> @@ -3873,22 +3873,18 @@
>      sws_opts = sws_getContext(16,16,0, 16,16,0, sws_flags, NULL,NULL,NULL);
>  
>      show_banner();
> -    if (argc <= 1) {
> -        show_help();
> -        av_exit(1);
> -    }
>  
>      /* parse options */
>      parse_options(argc, argv, options, opt_output_file);
>  
>      /* file converter / grab */
>      if (nb_output_files <= 0) {
> -        fprintf(stderr, "Must supply at least one output file\n");
> +        fprintf(stderr, "At least one output file must be specified\n");
>          av_exit(1);
>      }
>  
>      if (nb_input_files == 0) {
> -        fprintf(stderr, "Must supply at least one input file\n");
> +        fprintf(stderr, "At least one input file must be specified\n");
>          av_exit(1);
>      }
>  
> Index: ffplay.c
> ===================================================================
> --- ffplay.c	(revision 15736)
> +++ ffplay.c	(working copy)
> @@ -2553,7 +2553,7 @@
>      parse_options(argc, argv, options, opt_input_file);
>  
>      if (!input_filename) {
> -        show_help();
> +        fprintf(stderr, "An input file must be specified\n");
>          exit(1);
>      }

Ping.

As I already replied to Diego, I think that eventual missing periods
in the messages should be globally fixed in another patch.

Regards.
-- 
FFmpeg = Friendly and Friendly MultiPurpose Elegant Game




More information about the ffmpeg-devel mailing list