[FFmpeg-devel] [PATCH] Define cmdline_program_name and use it in show_help

Aurelien Jacobs aurel
Mon Oct 27 13:36:45 CET 2008


Benoit Fouet wrote:

> Hi,
> 
> Stefano Sabatini wrote:
> > Hi, as in subject.
> >
> > Usage message shown in show_help mimicks the commandline command to
> > issue, so program_name is not the right choice, and to use argv[0] is
> > nicer than use an hardcoded value.
> >
> > Regards.
> > --
> > FFmpeg = Fantastic and Funny Mythic Portentous Empowered Gadget
> >   
> > ------------------------------------------------------------------------
> >
> > Index: ffmpeg.c
> > ===================================================================
> > --- ffmpeg.c	(revision 15712)
> > +++ ffmpeg.c	(working copy)
> > @@ -71,6 +71,7 @@
> >  #undef exit
> >  
> >  const char program_name[] = "FFmpeg";
> > +const char* cmdline_program_name = NULL;
> >   
> 
> why is it not static ? btw, I'd prefer char *foo to char* foo, but maybe
> that's just me...

I also prefer char *foo.
And no need to initialize it to NULL.

Aurel




More information about the ffmpeg-devel mailing list