[FFmpeg-devel] [PATCH] Make parse_options take as argument a parse argument function

Stefano Sabatini stefano.sabatini-lala
Mon Aug 13 11:06:01 CEST 2007


On date Friday 2007-08-10 21:31:01 +0200, Michael Niedermayer encoded:
> Hi
> 
> On Fri, Aug 10, 2007 at 09:34:09PM +0200, Stefano Sabatini wrote:
> > On date Friday 2007-08-10 20:30:28 +0200, Michael Niedermayer encoded:
> > > Hi
> > > 
> > > On Fri, Aug 10, 2007 at 07:54:18PM +0200, Stefano Sabatini wrote:
> > > > Hi all.
> > > > 
> > > > Suggested log: 
> > > > make cmdutils.c:parse_options take as argument a parse bare argument function.
> > > > 
> > > > Rationale:
> > > > 
> > > > * make more explicit the behaviour of the parse_options function
> > > > 
> > > > * no need to define anymore a function named parse_arg_file in a file
> > > >   using cmdutils.c, a bare argument in the command line is managed by
> > > >   the function passed to parse_options
> > > > 
> > > > * as a consequence of the previous point, is cleaner to include the
> > > >   cmdutils.c module into a program which doesn't use the parse_options
> > > >   function (no need to define an eventually empty parse_arg_file
> > > >   function)
> > > [...]
> > > > Index: ffplay.c
> > > > ===================================================================
> > > > --- ffplay.c	(revision 10049)
> > > > +++ ffplay.c	(working copy)
> > > > @@ -2515,7 +2515,7 @@
> > > >             );
> > > >  }
> > > >  
> > > > -void parse_arg_file(const char *filename)
> > > > +void opt_input_file(const char *filename)
> > > >  {
> > > 
> > > cosmtic
> > > 
> > > the rest of the patch looks ok
> > 
> > Fixed.
> 
> ok

Sorry for insisting, can someone apply this (I have other patches
waiting for it)?

The only change from the one approved by Michael is in the documentation:

+/**
+ * Parses the command line arguments.
+ * @param options array with the definitions required to interpret every option of the form: 
+ * -<option name> <argument>
    ^^^^^^^^^^^^^^^^^^^^^^^^^
Substituted with:
-<option name> [<argument>]

Thanks, cheers.
-- 
Stefano Sabatini
Linux user number 337176 (see http://counter.li.org)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: make-parse-options-take-as-argument-parse-arg-function-03.patch
Type: text/x-diff
Size: 2542 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070813/bc400981/attachment.patch>



More information about the ffmpeg-devel mailing list