diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-12-13 18:17:48 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-12-13 18:17:48 +0100 |
commit | 616e6ffac694831148b7ec815c709564c01d62e5 (patch) | |
tree | af5e0a026dae8fa3a2f40b5cb8950a0d13809f96 /libavfilter | |
parent | 7726916c14e3385148b92dbd23a89948c2c29c09 (diff) | |
download | ffmpeg-616e6ffac694831148b7ec815c709564c01d62e5.tar.gz |
aresample: increase n_out buffer size a bit to reduce delay in some corner cases
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavfilter')
-rw-r--r-- | libavfilter/af_aresample.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavfilter/af_aresample.c b/libavfilter/af_aresample.c index 2dcfd695b0..03c8f01ef5 100644 --- a/libavfilter/af_aresample.c +++ b/libavfilter/af_aresample.c @@ -174,7 +174,7 @@ static int filter_frame(AVFilterLink *inlink, AVFilterBufferRef *insamplesref) { AResampleContext *aresample = inlink->dst->priv; const int n_in = insamplesref->audio->nb_samples; - int n_out = FFMAX(n_in * aresample->ratio * 2, 1); + int n_out = n_in * aresample->ratio * 2 + 256; AVFilterLink *const outlink = inlink->dst->outputs[0]; AVFilterBufferRef *outsamplesref = ff_get_audio_buffer(outlink, AV_PERM_WRITE, n_out); int ret; |