[FFmpeg-cvslog] lavfi: properly signal out-of-memory error in ff_filter_samples
Reinhard Tartler
git at videolan.org
Sun Aug 5 23:06:31 CEST 2012
ffmpeg | branch: master | Reinhard Tartler <siretart at tauware.de> | Sat Aug 4 15:24:15 2012 +0200| [800750417ffea64cde827de08e31e6523205f8d1] | committer: 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/
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=800750417ffea64cde827de08e31e6523205f8d1
---
libavfilter/audio.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/libavfilter/audio.c b/libavfilter/audio.c
index d518b24..bd718c6 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;
More information about the ffmpeg-cvslog
mailing list