[FFmpeg-devel] [PATCH] Enhance libavcodec/opt.c API
Mon May 12 00:01:05 CEST 2008
On Sun, May 11, 2008 at 10:49:37PM +0200, Stefano Sabatini wrote:
> On date Sunday 2008-05-11 19:09:02 +0200, Michael Niedermayer encoded:
> > On Sun, May 11, 2008 at 06:08:06PM +0200, Stefano Sabatini wrote:
> > > Hi all,
> > >
> > > one of the main problems with the AVOption API is that it is
> > > impossible to distinguish when setting an option value if an option is
> > > simply not present in a context, or the provided value is wrong.
> > >
> > > This proposal adds a function named av_set_opt_string() which takes as
> > > parameter the pointer to the option to be set, this solution could
> > > eventually be extended to the other av_set_* and av_get_* functions
> > > (also improving efficiency in many cases).
> > >
> > > In this way you can check for the presence of an option with
> > > av_opt_find(), then use the av_set_opt_string() function on the found
> > > option to set its value, if the value provided is wrong then it will
> > > return NULL.
> > patch rejected
> Please could you elaborate more on this (I'm just wondering which
> obvious thing I missed this time).
I see no limitation even less so see i any removed limitation in your patch.
> Anyway current behavior of ffmpeg:opt_default() (which depends on the current
> limitation of opt.c API) sucks, for example:
> $ ffmpeg -b foo
> Must supply at least one output file
> $ ffmpeg -flags bar
> ffmpeg: unrecognized option '-flags'
I dont think your patch would change these in any way.
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Observe your enemies, for they first find out your faults. -- Antisthenes
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: Digital signature
More information about the ffmpeg-devel