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

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

Found with a clang-scan report on http://fate.libav.org/csa/
This commit is contained in:
Reinhard Tartler 2012-08-04 15:24:15 +02:00
parent 8b8750e061
commit 800750417f

View File

@ -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;