[FFmpeg-cvslog] af_aresample: allocate a larger buffer so accumulated data can be returned quicker
Michael Niedermayer
git at videolan.org
Sat May 19 19:28:57 CEST 2012
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat May 19 18:48:05 2012 +0200| [087d09b6d52285b88ddb6199d3386496e5403684] | committer: Michael Niedermayer
af_aresample: allocate a larger buffer so accumulated data can be returned quicker
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=087d09b6d52285b88ddb6199d3386496e5403684
---
libavfilter/af_aresample.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavfilter/af_aresample.c b/libavfilter/af_aresample.c
index e3a88ff..cc479e8 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);
More information about the ffmpeg-cvslog
mailing list