1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

af_resample: unref out_buf when avresample_convert returns 0

Fixes CID732273.
This commit is contained in:
Janne Grunau 2012-10-09 16:28:30 +02:00
parent 8501c09868
commit ac9a89562a

View File

@ -194,9 +194,10 @@ static int filter_samples(AVFilterLink *inlink, AVFilterBufferRef *buf)
buf_out->linesize[0], nb_samples,
buf->extended_data, buf->linesize[0],
buf->audio->nb_samples);
if (ret < 0) {
if (ret <= 0) {
avfilter_unref_buffer(buf_out);
goto fail;
if (ret < 0)
goto fail;
}
av_assert0(!avresample_available(s->avr));