[FFmpeg-cvslog] Merge commit '85770f2a2651497861ed938efcd0df3696ff5e45'

Stefano Sabatini stefano.sabatini-lala at poste.it
Sun May 1 02:04:58 CEST 2011


On date Sunday 2011-05-01 01:01:30 +0200, Stefano Sabatini wrote:
> On date Sunday 2011-05-01 00:27:06 +0200, Michael Niedermayer wrote:
> > ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun May  1 00:21:56 2011 +0200| [ffb5a0d533498102c31aa131bc91a4cce868b0a8] | committer: Michael Niedermayer
> > 
> > Merge commit '85770f2a2651497861ed938efcd0df3696ff5e45'
> > 
> > * commit '85770f2a2651497861ed938efcd0df3696ff5e45':
> >   AVOptions: make default_val a union, as proposed in AVOption2.
> >   Move ff_dynarray_add to lavu and make it public.
> >   lavf: remove duplicate assignment in avformat_alloc_context.
> >   lavf: use designated initializers for AVClasses.
> >   options: simplify av_find_opt by using av_next_option.
> > 
> > Merged-by: Michael Niedermayer <michaelni at gmx.at>
> > 
> > > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ffb5a0d533498102c31aa131bc91a4cce868b0a8
> > ---
> 
> Why did you remove .i64 and .q from the default_val union?
> 
> For the rational it is more safe/logical not assume sizeof(double) >=
> sizeof(int64_t), for the second it may be convenient to express a
> default by using a rational rather than its double representation, for
> documentation/convenience purposes.

String default value setting doesn't work, that's because
av_set_string3() doesn't accept NULL values for val, so for example:

av_set_string3(obj, name, NULL, 1, NULL);

will always return AVERROR(EINVAL).

Here there is a problem since you can't represent a NULL value string
with a string safely, you could set "" but that's not the very same
thing.
-- 
The best book on programming for the layman is "Alice in Wonderland";
but that's because it's the best book on anything for the layman.


More information about the ffmpeg-cvslog mailing list