[FFmpeg-devel] [PATCH] use av_log_level for x264 log
Limin Wang
lance.lmwang
Thu Jul 12 03:59:45 CEST 2007
Hi,
It's annoying to see some debug info from x264 even -v 0, the
patch try to use av_log_level to control x264 log also. I have
tested, it's OK here, please review it.
Thanks,
Limin
-------------- next part --------------
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);
}
@@ -254,7 +244,7 @@
x4->params.rc.psz_rc_eq = avctx->rc_eq;
x4->params.analyse.b_psnr = (avctx->flags & CODEC_FLAG_PSNR);
- x4->params.i_log_level = X264_LOG_DEBUG;
+ x4->params.i_log_level = av_log_level;
x4->params.b_aud = (avctx->flags2 & CODEC_FLAG2_AUD);
More information about the ffmpeg-devel
mailing list