avfilter/af_stereowiden: Round length to nearest

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer 2023-12-24 19:54:27 +01:00
parent d909d8e5e0
commit aec67d3d7d
No known key found for this signature in database
GPG Key ID: B18E8928B3948D64

View File

@ -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)