aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-05-19 18:48:05 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-05-19 19:23:38 +0200
commit087d09b6d52285b88ddb6199d3386496e5403684 (patch)
tree908df276174f400c48f4b36fbedd67dc831f7c3d
parente17a039647dd674f2397b54486abb2236da93b4a (diff)
downloadffmpeg-087d09b6d52285b88ddb6199d3386496e5403684.tar.gz
af_aresample: allocate a larger buffer so accumulated data can be returned quicker
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavfilter/af_aresample.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavfilter/af_aresample.c b/libavfilter/af_aresample.c
index e3a88ff8a7..cc479e802a 100644
--- a/libavfilter/af_aresample.c
+++ b/libavfilter/af_aresample.c
@@ -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);