diff mbox

[FFmpeg-devel,1/2] avcodec/utils: print initial and trailing paddings only in verbose levels

Message ID 20160826185159.4996-1-jamrial@gmail.com
State Accepted
Commit 4fed4aca0c20f9ca255189df87ba58638061cecd
Headers show

Commit Message

James Almer Aug. 26, 2016, 6:51 p.m. UTC
Signed-off-by: James Almer <jamrial@gmail.com>
---
 libavcodec/utils.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

James Almer Sept. 2, 2016, 9:12 p.m. UTC | #1
On 8/26/2016 3:51 PM, James Almer wrote:
> Signed-off-by: James Almer <jamrial@gmail.com>
> ---
>  libavcodec/utils.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/libavcodec/utils.c b/libavcodec/utils.c
> index 138125a..7e99c58 100644
> --- a/libavcodec/utils.c
> +++ b/libavcodec/utils.c
> @@ -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);
>          }
> 

Ping for set.
Carl Eugen Hoyos Sept. 3, 2016, 11:24 a.m. UTC | #2
2016-09-02 23:12 GMT+02:00 James Almer <jamrial@gmail.com>:

> Ping for set.

Both patches look very useful to me.

Carl Eugen
James Almer Sept. 3, 2016, 2:59 p.m. UTC | #3
On 9/3/2016 8:24 AM, Carl Eugen Hoyos wrote:
> 2016-09-02 23:12 GMT+02:00 James Almer <jamrial@gmail.com>:
> 
>> Ping for set.
> 
> Both patches look very useful to me.
> 
> Carl Eugen

Pushed, thanks.
diff mbox

Patch

diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 138125a..7e99c58 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -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);
         }