avfilter/af_stereowiden: Round length to nearest
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
d909d8e5e0
commit
aec67d3d7d
@ -72,7 +72,7 @@ static int config_input(AVFilterLink *inlink)
|
|||||||
AVFilterContext *ctx = inlink->dst;
|
AVFilterContext *ctx = inlink->dst;
|
||||||
StereoWidenContext *s = ctx->priv;
|
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->length *= 2;
|
||||||
s->buffer = av_calloc(s->length, sizeof(*s->buffer));
|
s->buffer = av_calloc(s->length, sizeof(*s->buffer));
|
||||||
if (!s->buffer)
|
if (!s->buffer)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user