diff options
author | Reinhard Tartler <siretart@tauware.de> | 2012-08-04 17:24:15 +0400 |
---|---|---|
committer | Reinhard Tartler <siretart@tauware.de> | 2012-08-05 12:26:49 +0400 |
commit | 800750417ffea64cde827de08e31e6523205f8d1 (patch) | |
tree | 77b140367815c044009ffcdb1f6a5f8e6d6c4b69 /libavfilter/audio.c | |
parent | 8b8750e0612f0bc30fafbb767f7931158868971d (diff) |
lavfi: properly signal out-of-memory error in ff_filter_samples
Found with a clang-scan report on http://fate.libav.org/csa/
Diffstat (limited to 'libavfilter/audio.c')
-rw-r--r-- | libavfilter/audio.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavfilter/audio.c b/libavfilter/audio.c index d518b247a3..bd718c611d 100644 --- a/libavfilter/audio.c +++ b/libavfilter/audio.c @@ -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; |