Commit ac9a8956 authored by Janne Grunau's avatar Janne Grunau
Browse files

af_resample: unref out_buf when avresample_convert returns 0

Fixes CID732273.
parent 8501c098
......@@ -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));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment