Commit 80075041 authored by Reinhard Tartler's avatar Reinhard Tartler

lavfi: properly signal out-of-memory error in ff_filter_samples

Found with a clang-scan report on http://fate.libav.org/csa/
parent 8b8750e0
......@@ -172,6 +172,10 @@ int ff_filter_samples(AVFilterLink *link, AVFilterBufferRef *samplesref)
buf_out = ff_default_get_audio_buffer(link, dst->min_perms,
samplesref->audio->nb_samples);
if (!buf_out) {
avfilter_unref_buffer(samplesref);
return AVERROR(ENOMEM);
}
buf_out->pts = samplesref->pts;
buf_out->audio->sample_rate = samplesref->audio->sample_rate;
......
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