diff options
author | Anton Khirnov <anton@khirnov.net> | 2014-03-20 20:40:24 +0100 |
---|---|---|
committer | Reinhard Tartler <siretart@tauware.de> | 2014-04-19 22:03:29 -0400 |
commit | 9d02e38d3f03100784348ff75fd181d2aaad7e43 (patch) | |
tree | 41bc25a7ff4d1186bf0f60d3b3c33ff3889867ca | |
parent | 0f6e309b97e3da83a0fa75fbf1c4b50cd72047eb (diff) | |
download | ffmpeg-9d02e38d3f03100784348ff75fd181d2aaad7e43.tar.gz |
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@libav.org
(cherry picked from commit ac976ed91e323754e9a84509873ebdb437372797)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
-rw-r--r-- | libavresample/utils.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavresample/utils.c b/libavresample/utils.c index 2dd3d0616f..bc295d6a58 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); |