Commit 087d09b6 authored by Michael Niedermayer's avatar Michael Niedermayer

af_aresample: allocate a larger buffer so accumulated data can be returned quicker

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent e17a0396
......@@ -165,7 +165,7 @@ static void filter_samples(AVFilterLink *inlink, AVFilterBufferRef *insamplesref
{
AResampleContext *aresample = inlink->dst->priv;
const int n_in = insamplesref->audio->nb_samples;
int n_out = n_in * aresample->ratio + 1;
int n_out = n_in * aresample->ratio * 2 ;
AVFilterLink *const outlink = inlink->dst->outputs[0];
AVFilterBufferRef *outsamplesref = ff_get_audio_buffer(outlink, AV_PERM_WRITE, n_out);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment