[FFmpeg-devel] [PATCH] lavfi/life: check return value of ff_get_video_buffer()
Paul B Mahol
onemda at gmail.com
Mon Apr 8 20:54:26 CEST 2013
Signed-off-by: Paul B Mahol <onemda at gmail.com>
---
libavfilter/vsrc_life.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavfilter/vsrc_life.c b/libavfilter/vsrc_life.c
index 0474ef2..d7ed40b 100644
--- a/libavfilter/vsrc_life.c
+++ b/libavfilter/vsrc_life.c
@@ -420,6 +420,8 @@ static int request_frame(AVFilterLink *outlink)
{
LifeContext *life = outlink->src->priv;
AVFrame *picref = ff_get_video_buffer(outlink, life->w, life->h);
+ if (!picref)
+ return AVERROR(ENOMEM);
picref->sample_aspect_ratio = (AVRational) {1, 1};
picref->pts = life->pts++;
--
1.7.11.2
More information about the ffmpeg-devel
mailing list