[FFmpeg-cvslog] avcodec/utils: print only the padding values that are set

James Almer git at videolan.org
Sat Sep 3 17:58:06 EEST 2016


ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Fri Aug 26 15:39:37 2016 -0300| [d2e74315e5be4da3e3b384fb7453296140fafd9b] | committer: James Almer

avcodec/utils: print only the padding values that are set

Reviewed-by: Carl Eugen Hoyos <ceffmpeg at gmail.com>
Signed-off-by: James Almer <jamrial at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d2e74315e5be4da3e3b384fb7453296140fafd9b
---

 libavcodec/utils.c | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 7e99c58..0f6d0e7 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -3258,10 +3258,13 @@ 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 (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);
+        if (av_log_get_level() >= AV_LOG_VERBOSE) {
+            if (enc->initial_padding)
+                snprintf(buf + strlen(buf), buf_size - strlen(buf),
+                         ", delay %d", enc->initial_padding);
+            if (enc->trailing_padding)
+                snprintf(buf + strlen(buf), buf_size - strlen(buf),
+                         ", padding %d", enc->trailing_padding);
         }
         break;
     case AVMEDIA_TYPE_DATA:



More information about the ffmpeg-cvslog mailing list