[FFmpeg-devel] [PATCH] lavfi/mptestsrc: check return value off ff_get_video_buffer()
Paul B Mahol
onemda at gmail.com
Mon Apr 8 20:55:48 CEST 2013
Signed-off-by: Paul B Mahol <onemda at gmail.com>
---
libavfilter/vsrc_mptestsrc.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavfilter/vsrc_mptestsrc.c b/libavfilter/vsrc_mptestsrc.c
index 856c3e4..9f1c46f 100644
--- a/libavfilter/vsrc_mptestsrc.c
+++ b/libavfilter/vsrc_mptestsrc.c
@@ -323,6 +323,8 @@ static int request_frame(AVFilterLink *outlink)
if (test->max_pts >= 0 && test->pts > test->max_pts)
return AVERROR_EOF;
picref = ff_get_video_buffer(outlink, w, h);
+ if (!picref)
+ return AVERROR(ENOMEM);
picref->pts = test->pts++;
// clean image
--
1.7.11.2
More information about the ffmpeg-devel
mailing list