From aec67d3d7d2895bfea61aa1358d9d8e956f8615c Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sun, 24 Dec 2023 19:54:27 +0100 Subject: [PATCH] avfilter/af_stereowiden: Round length to nearest Signed-off-by: Michael Niedermayer --- 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 af4b23e8a5..97610a4f30 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; s->buffer = av_calloc(s->length, sizeof(*s->buffer)); if (!s->buffer)