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

Diego Biurrun diego at biurrun.de
Fri Aug 20 10:46:44 CEST 2010


On Thu, Aug 19, 2010 at 08:49:05PM -0400, Vlad Seryakov wrote:
>
> Noticing a lot of ac3 @ ..... frame CRC errors with -msglevel all=0 i
> discovered that in ad_ffmpeg.c that it does not handle av_log level
> the same way as in vd_ffmpeg. This patch makes sure the verbose level
> is the same for both mplayer and ffmpeg. May be the best approach
> would be to make both ad_ and vd_ use the same log callback but it
> requires more refactoring.
>
> --- libmpcodecs/ad_ffmpeg.c	(revision 31984)
> +++ libmpcodecs/ad_ffmpeg.c	(working copy)
> @@ -99,6 +99,18 @@
> +      switch(verbose){

switch (verbose) {

> +      case MSGL_FATAL: av_log_set_level(AV_LOG_FATAL); break;
> +      case MSGL_ERR: av_log_set_level(AV_LOG_ERROR); break;
> +      case MSGL_WARN: av_log_set_level(AV_LOG_WARNING); break;
> +      case MSGL_INFO: av_log_set_level(AV_LOG_INFO); break;
> +      case MSGL_V: av_log_set_level(AV_LOG_DEBUG); break;

This could be vertically aligned for better readability.

> +      case 7:
> +      case 8:
> +      case 9:
> +      case 10: av_log_set_level(AV_LOG_VERBOSE); break;
> +      }

This could use a default case.

Diego


More information about the MPlayer-dev-eng mailing list