[FFmpeg-devel] [PATCH]Print number of reference frames if debug level >= verbose

Carl Eugen Hoyos cehoyos at ag.or.at
Tue Mar 10 15:27:20 CET 2015


Hi!

Attached patch prints the number of reference frames 
on increased loglevel.

Please comment, Carl Eugen
-------------- next part --------------
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 5b28496..aa00581 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -3024,6 +3024,8 @@ void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode)
 
     if (profile)
         snprintf(buf + strlen(buf), buf_size - strlen(buf), " (%s)", profile);
+    if (av_log_get_level() >= AV_LOG_VERBOSE && enc->refs)
+        snprintf(buf + strlen(buf), buf_size - strlen(buf), ", %d reference frame(s)", enc->refs);
 
     if (enc->codec_tag) {
         char tag_buf[32];


More information about the ffmpeg-devel mailing list