diff --git a/libavfilter/af_stereotools.c b/libavfilter/af_stereotools.c index 4bcd696cf9..915edecc53 100644 --- a/libavfilter/af_stereotools.c +++ b/libavfilter/af_stereotools.c @@ -119,7 +119,7 @@ static int config_input(AVFilterLink *inlink) AVFilterContext *ctx = inlink->dst; StereoToolsContext *s = ctx->priv; - s->length = FFALIGN(inlink->sample_rate / 10, 2); + s->length = FFALIGN((inlink->sample_rate + 9) / 10, 2); if (!s->buffer) s->buffer = av_calloc(s->length, sizeof(*s->buffer)); if (!s->buffer)