Merge commit '744d813bcf527481f2217428fa08bfee8642935b' into release/2.4

* commit '744d813bcf527481f2217428fa08bfee8642935b':
  avresample: Reallocate the internal buffer to the correct size

Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer
2015-05-19 21:07:02 +02:00

View File

@@ -432,7 +432,9 @@ int ff_audio_resample(ResampleContext *c, AudioData *dst, AudioData *src)
int bps = av_get_bytes_per_sample(c->avr->internal_sample_fmt);
int i;
ret = ff_audio_data_realloc(c->buffer, in_samples + c->padding_size);
ret = ff_audio_data_realloc(c->buffer,
FFMAX(in_samples, in_leftover) +
c->padding_size);
if (ret < 0) {
av_log(c->avr, AV_LOG_ERROR, "Error reallocating resampling buffer\n");
return AVERROR(ENOMEM);