[MPlayer-dev-eng] [PATCH] ad_ffmpeg does not honor log level

Reimar Döffinger Reimar.Doeffinger at gmx.de
Sat Aug 21 20:27:59 CEST 2010


On Sat, Aug 21, 2010 at 08:15:27PM +0200, Diego Biurrun wrote:
> On Sat, Aug 21, 2010 at 01:09:27PM -0400, Vlad Seryakov wrote:
> > On Aug 21, 2010, at 9:41 AM, Diego Biurrun wrote:
> > >>>> +      case 7:
> > >>>> +      case 8:
> > >>>> +      case 9:
> > >>>> +      case 10: av_log_set_level(AV_LOG_VERBOSE); break;
> > >>>> +      }
> > >>> 
> > >>> This could use a default case.
> > >>> 
> > >> I am not sure if INFO is a good choice for default but this is what is
> > >> default in avutil/log.c so at least it preserves default logging level
> > > 
> > > I was thinking about the empty cases for 7, 8, 9.  Why are they empty?
> >
> > In ffmpeg these levels fall into verbose category and verbose cannot
> > be default level
> 
> They will fall into the default: case if you drop them.
> 
> > --- libmpcodecs/ad_ffmpeg.c	(revision 31984)
> > +++ libmpcodecs/ad_ffmpeg.c	(working copy)
> > @@ -99,6 +99,18 @@
> > +      
> > +      switch(verbose){
> 
> Once again with feeling: Format this in K&R style:
> 
>   switch (verbose) {

Please don't spend more time on this, it is a really bad quick hack.
We need a proper "intialize ffmpeg" function that is called everywhere,
not this piecemeal "initialize a bit here, a bit there", then our own
callback can be installed from there (like vd_ffmpeg already does,
but obviously only if we use an FFmpeg video decoder) and fix this properly.


More information about the MPlayer-dev-eng mailing list