[FFmpeg-devel] [PATCH] asrc_anullsrc: extend syntax to make it accept a non positional list of argument

Stefano Sabatini stefasab at gmail.com
Sun Sep 18 03:04:53 CEST 2011

On date Sunday 2011-09-18 02:06:22 +0200, Michael Niedermayer encoded:
> On Sat, Sep 17, 2011 at 12:54:35PM +0200, Stefano Sabatini wrote:
> > From: Stefano Sabatini <stefasab at gmail.com>
> > 
> > The new syntax is more extensible and more user-friendly.
> > 
> > This breaks the previous syntax, should not be an issue as possibly
> > no-one is already using the anullsrc.
> > ---
> >  doc/filters.texi            |   26 ++++++++++++------
> >  libavfilter/asrc_anullsrc.c |   62 +++++++++++++++++++++++++++++-------------
> >  2 files changed, 60 insertions(+), 28 deletions(-)
> i liked the old syntax but if you prefer this new syntax then fine
> with me

My point is that I dislike the syntax:

since it doesn't give a clue about what the parameters mean (and you
need to check the docs, if unlucky the source). Also this becomes even
worse when you have optional parameters which don't need to be
explicitely set (with positional arguments you're forced to set them),
if you need to add more parameters (as in this case) it becomes more
and more clumsy and error prone.

That's why I favor named parameters over positional ones.
FFmpeg = Fascinating Fiendish Multimedia Puristic Esoteric Generator

More information about the ffmpeg-devel mailing list