[FFmpeg-devel] [PATCH 1/4] avfilter/af_stereowiden: Round length to nearest

Michael Niedermayer michael at niedermayer.cc
Mon Dec 25 01:26:21 EET 2023


Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
---
 libavfilter/af_stereowiden.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavfilter/af_stereowiden.c b/libavfilter/af_stereowiden.c
index f7a6a91ae40..1273c77116e 100644
--- a/libavfilter/af_stereowiden.c
+++ b/libavfilter/af_stereowiden.c
@@ -72,7 +72,7 @@ static int config_input(AVFilterLink *inlink)
     AVFilterContext *ctx = inlink->dst;
     StereoWidenContext *s = ctx->priv;
 
-    s->length = s->delay * inlink->sample_rate / 1000;
+    s->length = lrintf(s->delay * inlink->sample_rate / 1000);
     s->length *= 2;
     if (s->length == 0)
         return AVERROR(EINVAL);
-- 
2.17.1



More information about the ffmpeg-devel mailing list