avcodec/utils: print initial and trailing paddings only in verbose levels
authorJames Almer <jamrial@gmail.com>
Fri, 26 Aug 2016 18:30:58 +0000 (15:30 -0300)
committerJames Almer <jamrial@gmail.com>
Sat, 3 Sep 2016 14:57:18 +0000 (11:57 -0300)
Reviewed-by: Carl Eugen Hoyos <ceffmpeg@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
libavcodec/utils.c

index 138125a..7e99c58 100644 (file)
@@ -3258,7 +3258,8 @@ void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode)
             && enc->bits_per_raw_sample != av_get_bytes_per_sample(enc->sample_fmt) * 8)
             snprintf(buf + strlen(buf), buf_size - strlen(buf),
                      " (%d bit)", enc->bits_per_raw_sample);
-        if (enc->initial_padding || enc->trailing_padding) {
+        if (av_log_get_level() >= AV_LOG_VERBOSE &&
+            (enc->initial_padding || enc->trailing_padding)) {
             snprintf(buf + strlen(buf), buf_size - strlen(buf),
                      ", delay %d, padding %d", enc->initial_padding, enc->trailing_padding);
         }