[FFmpeg-devel] [PATCH] lavfi/mandelbrot: check retn value of ff_get_video_buffer()
Paul B Mahol
onemda at gmail.com
Mon Apr 8 20:48:58 CEST 2013
Signed-off-by: Paul B Mahol <onemda at gmail.com>
---
libavfilter/vsrc_mandelbrot.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libavfilter/vsrc_mandelbrot.c b/libavfilter/vsrc_mandelbrot.c
index 7bbdf95..c91494b 100644
--- a/libavfilter/vsrc_mandelbrot.c
+++ b/libavfilter/vsrc_mandelbrot.c
@@ -403,6 +403,9 @@ static int request_frame(AVFilterLink *link)
{
MBContext *mb = link->src->priv;
AVFrame *picref = ff_get_video_buffer(link, mb->w, mb->h);
+ if (!picref)
+ return AVERROR(ENOMEM);
+
picref->sample_aspect_ratio = (AVRational) {1, 1};
picref->pts = mb->pts++;
--
1.7.11.2
More information about the ffmpeg-devel
mailing list