From 185af4ccb1702aa37f1f61fc77c2b37f1b2f4d8d Mon Sep 17 00:00:00 2001 From: Paul B Mahol Date: Mon, 20 Nov 2017 10:58:35 +0100 Subject: [PATCH] avfilter/af_extrastereo: fix filtering when clipping is disabled Signed-off-by: Paul B Mahol --- libavfilter/af_extrastereo.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libavfilter/af_extrastereo.c b/libavfilter/af_extrastereo.c index a746006f71..b07c006f2c 100644 --- a/libavfilter/af_extrastereo.c +++ b/libavfilter/af_extrastereo.c @@ -90,9 +90,12 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in) right = average + mult * (right - average); if (s->clip) { - dst[n * 2 ] = av_clipf(left, -1, 1); - dst[n * 2 + 1] = av_clipf(right, -1, 1); + left = av_clipf(left, -1, 1); + right = av_clipf(right, -1, 1); } + + dst[n * 2 ] = left; + dst[n * 2 + 1] = right; } if (out != in)