[FFmpeg-cvslog] lavr: allocate the resampling buffer with a positive size

Anton Khirnov git at videolan.org
Sun May 4 20:55:12 CEST 2014


ffmpeg | branch: release/2.2 | Anton Khirnov <anton at khirnov.net> | Thu Mar 20 20:40:24 2014 +0100| [9d02e38d3f03100784348ff75fd181d2aaad7e43] | committer: Reinhard Tartler

lavr: allocate the resampling buffer with a positive size

This fixes cases where very few input samples (fewer than needed for one
output sample) are passed to lavr at the beginning.
CC:libav-stable at libav.org

(cherry picked from commit ac976ed91e323754e9a84509873ebdb437372797)
Signed-off-by: Reinhard Tartler <siretart at tauware.de>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9d02e38d3f03100784348ff75fd181d2aaad7e43
---

 libavresample/utils.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavresample/utils.c b/libavresample/utils.c
index 2dd3d06..bc295d6 100644
--- a/libavresample/utils.c
+++ b/libavresample/utils.c
@@ -184,7 +184,7 @@ int avresample_open(AVAudioResampleContext *avr)
     }
     if (avr->resample_needed) {
         avr->resample_out_buffer = ff_audio_data_alloc(avr->out_channels,
-                                                       0, avr->internal_sample_fmt,
+                                                       1024, avr->internal_sample_fmt,
                                                        "resample_out_buffer");
         if (!avr->resample_out_buffer) {
             ret = AVERROR(EINVAL);



More information about the ffmpeg-cvslog mailing list