[FFmpeg-devel] [PATCH] Make ffserver use parse_options()

Michael Niedermayer michaelni
Mon May 19 03:03:46 CEST 2008


On Sun, May 18, 2008 at 08:34:36PM +0200, Stefano Sabatini wrote:
> On date Sunday 2008-05-18 14:29:48 +0200, Michael Niedermayer encoded:
> > On Sun, May 18, 2008 at 09:38:55AM +0200, Stefano Sabatini wrote:
> [...]
> > > > > I prefer to define consistently all the opt_* before the options
> > > > > array, anyway i reckon this is just pickyness so do as you prefer.
> > > > 
> > > > Well then define them all before the array, its not my fault if you do not.
> > > 
> > > No I can't because opt_show_help() uses the options array itself, so I
> > > have to define it before.
> > 
> > You can forward declare the array ...
[...]
> @@ -4339,10 +4329,40 @@
>      need_to_start_children = 1;
>  }
>  
> +static void opt_show_license(void)
> +{
> +    show_license();
> +    exit(0);
> +}
> +
> +static void opt_debug()
> +{
> +    ffserver_debug = 1;
> +    ffserver_daemon = 0;
> +}
> +
> +static const OptionDef options[];
> +
> +static void opt_show_help(void)

Please place the declarartion before all functions and stuctures
It does not belong in the middle of the file, just think of the case
that the array becomed needed a line above ...

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

There will always be a question for which you do not know the correct awnser.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080519/c8da2895/attachment.pgp>



More information about the ffmpeg-devel mailing list