Skip to content

Commit

Permalink
lavr: allocate the resampling buffer with a positive size
Browse files Browse the repository at this point in the history
This fixes cases where very few input samples (fewer than needed for one
output sample) are passed to lavr at the beginning.
CC:[email protected]
  • Loading branch information
elenril committed Apr 13, 2014
1 parent 13164e4 commit ac976ed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libavresample/utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,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);
Expand Down

0 comments on commit ac976ed

Please sign in to comment.