[FFmpeg-cvslog] r11202 - trunk/configure

Rich Felker dalias
Thu Dec 13 06:31:38 CET 2007

On Wed, Dec 12, 2007 at 08:27:57PM +0100, Michael Niedermayer wrote:
> > > some examples where this is currently used are
> > > 
> > > av_log_level
> > > av_vlog
> > > currently we have wraper functions for these to set/get them
> > > originally i wanted to drop these functions, as can be seen by the
> > > #if LIBAVUTIL_VERSION_INT in log.{c,h}
> > > i guess we should just leave the more complex API or do you suggest that
> > > we change it to 2 functions to returning pointers to av_log_level and av_vlog?
> > 
> > I thought that stuff had been fixed to use the context and not global
> > vars....
> using the context is inconvenient

Having a global for the whole library is not only involvenient bug
bug-prone. Consider an app that uses lavc directly and also uses
gstreamer, which then dynamically loads lavc. They'll both set the log
functions to conflicting values, possibly breaking one another's

> you would have to set the callback for every codec, muxer, demuxer, ...

Yes, and this should be done. It's not hard. And it's The Right Thing.

> if you miss one output goes to stderr, also there are a few av_log(NULL, ...
> they wont work with whats in the contexts

These should be fixed. Code which does not have a context should not
have anything worth spamming..


More information about the ffmpeg-cvslog mailing list