diff mbox

[FFmpeg-devel] libavfilter/af_biquads: warn about clipping only after frame with clipping

Message ID 1484231938-30546-1-git-send-email-skudryas@gmail.com
State Accepted
Commit a9b33b5a37ad86b111292fe85e5df1a72191e3a5
Headers show

Commit Message

Sergey Kudryashov Jan. 12, 2017, 2:38 p.m. UTC
---
 libavfilter/af_biquads.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Paul B Mahol Jan. 12, 2017, 6:51 p.m. UTC | #1
On 1/12/17, Sergey Kudryashov <skudryas@gmail.com> wrote:
> ---
>  libavfilter/af_biquads.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/libavfilter/af_biquads.c b/libavfilter/af_biquads.c
> index 4953202..79f1b7c 100644
> --- a/libavfilter/af_biquads.c
> +++ b/libavfilter/af_biquads.c
> @@ -420,6 +420,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame
> *buf)
>
>      if (s->clippings > 0)
>          av_log(ctx, AV_LOG_WARNING, "clipping %d times. Please reduce
> gain.\n", s->clippings);
> +    s->clippings = 0;
>
>      if (buf != out_buf)
>          av_frame_free(&buf);
> --
> 1.9.1

applied
diff mbox

Patch

diff --git a/libavfilter/af_biquads.c b/libavfilter/af_biquads.c
index 4953202..79f1b7c 100644
--- a/libavfilter/af_biquads.c
+++ b/libavfilter/af_biquads.c
@@ -420,6 +420,7 @@  static int filter_frame(AVFilterLink *inlink, AVFrame *buf)
 
     if (s->clippings > 0)
         av_log(ctx, AV_LOG_WARNING, "clipping %d times. Please reduce gain.\n", s->clippings);
+    s->clippings = 0;
 
     if (buf != out_buf)
         av_frame_free(&buf);