aboutsummaryrefslogtreecommitdiffstats
path: root/libavfilter/video.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2012-07-15 11:16:53 +0200
committerAnton Khirnov <anton@khirnov.net>2012-07-22 09:14:05 +0200
commit1dc42050185d63c1de5d16146fbaee92640af187 (patch)
treee53dbbfc52894acf4efd526b9ddcaf1d0b87d94d /libavfilter/video.c
parent80e4ed279b3abe9f5356e2b56255b2aa64527345 (diff)
downloadffmpeg-1dc42050185d63c1de5d16146fbaee92640af187.tar.gz
lavfi: check all avfilter_ref_buffer() calls for errors.
Diffstat (limited to 'libavfilter/video.c')
-rw-r--r--libavfilter/video.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/libavfilter/video.c b/libavfilter/video.c
index 8dd5bf4272..6e5063778a 100644
--- a/libavfilter/video.c
+++ b/libavfilter/video.c
@@ -176,12 +176,17 @@ static int default_start_frame(AVFilterLink *inlink, AVFilterBufferRef *picref)
outlink = inlink->dst->outputs[0];
if (outlink) {
+ AVFilterBufferRef *buf_out;
outlink->out_buf = ff_get_video_buffer(outlink, AV_PERM_WRITE, outlink->w, outlink->h);
if (!outlink->out_buf)
return AVERROR(ENOMEM);
avfilter_copy_buffer_ref_props(outlink->out_buf, picref);
- return ff_start_frame(outlink, avfilter_ref_buffer(outlink->out_buf, ~0));
+ buf_out = avfilter_ref_buffer(outlink->out_buf, ~0);
+ if (!buf_out)
+ return AVERROR(ENOMEM);
+
+ return ff_start_frame(outlink, buf_out);
}
return 0;
}