From 8f3a3ce7307e39a030db3bf8d2e525b21e039ca2 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Sun, 15 Jul 2012 11:16:53 +0200 Subject: lavfi: check all ff_get_video_buffer() calls for errors. --- libavfilter/vsrc_testsrc.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'libavfilter/vsrc_testsrc.c') diff --git a/libavfilter/vsrc_testsrc.c b/libavfilter/vsrc_testsrc.c index 22528b4650..42cd58ed89 100644 --- a/libavfilter/vsrc_testsrc.c +++ b/libavfilter/vsrc_testsrc.c @@ -135,6 +135,9 @@ 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, AV_PERM_WRITE, test->w, test->h); + if (!picref) + return AVERROR(ENOMEM); + picref->pts = test->pts++; picref->pos = -1; picref->video->key_frame = 1; -- cgit v1.2.3