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

Diego Biurrun diego at biurrun.de
Sat Aug 21 20:15:27 CEST 2010


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) {

Diego


More information about the MPlayer-dev-eng mailing list