mirror of
https://git.videolan.org/git/ffmpeg.git
synced 2024-10-02 01:05:03 +02:00
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
This commit is contained in:
parent
13164e479f
commit
ac976ed91e
@ -189,7 +189,7 @@ int avresample_open(AVAudioResampleContext *avr)
|
|||||||
}
|
}
|
||||||
if (avr->resample_needed) {
|
if (avr->resample_needed) {
|
||||||
avr->resample_out_buffer = ff_audio_data_alloc(avr->out_channels,
|
avr->resample_out_buffer = ff_audio_data_alloc(avr->out_channels,
|
||||||
0, avr->internal_sample_fmt,
|
1024, avr->internal_sample_fmt,
|
||||||
"resample_out_buffer");
|
"resample_out_buffer");
|
||||||
if (!avr->resample_out_buffer) {
|
if (!avr->resample_out_buffer) {
|
||||||
ret = AVERROR(EINVAL);
|
ret = AVERROR(EINVAL);
|
||||||
|
Loading…
Reference in New Issue
Block a user