[FFmpeg-devel] [PATCH] use av_log_level for x264 log
    Luca Abeni 
    lucabe72
       
    Thu Jul 12 09:22:18 CEST 2007
    
    
  
Hello,
Limin Wang wrote:
[...]
> Index: libavcodec/libx264.c
> ===================================================================
> --- libavcodec/libx264.c	(revision 9606)
> +++ libavcodec/libx264.c	(working copy)
> @@ -36,17 +36,7 @@
>  static void
>  X264_log(void *p, int level, const char *fmt, va_list args)
>  {
> -    static const int level_map[] = {
> -        [X264_LOG_ERROR]   = AV_LOG_ERROR,
> -        [X264_LOG_WARNING] = AV_LOG_ERROR,
> -        [X264_LOG_INFO]    = AV_LOG_INFO,
> -        [X264_LOG_DEBUG]   = AV_LOG_DEBUG
> -    };
> -
> -    if(level < 0 || level > X264_LOG_DEBUG)
> -        return;
> -
> -    av_vlog(p, level_map[level], fmt, args);
> +    av_vlog(p, level, fmt, args);
Loren already pointed out that removing the mapping table is not the 
correct solution; I just wanted to add that we now have an 
AV_LOG_WARNING error level, so the table can be updated accordingly.
			Thanks,
				Luca
    
    
More information about the ffmpeg-devel
mailing list