diff options
author | Anton Khirnov <anton@khirnov.net> | 2012-07-15 11:16:53 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2012-07-22 09:14:05 +0200 |
commit | 1dc42050185d63c1de5d16146fbaee92640af187 (patch) | |
tree | e53dbbfc52894acf4efd526b9ddcaf1d0b87d94d /libavfilter/vf_select.c | |
parent | 80e4ed279b3abe9f5356e2b56255b2aa64527345 (diff) |
lavfi: check all avfilter_ref_buffer() calls for errors.
Diffstat (limited to 'libavfilter/vf_select.c')
-rw-r--r-- | libavfilter/vf_select.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libavfilter/vf_select.c b/libavfilter/vf_select.c index b4a424e1d2..59030ebced 100644 --- a/libavfilter/vf_select.c +++ b/libavfilter/vf_select.c @@ -233,6 +233,7 @@ static int start_frame(AVFilterLink *inlink, AVFilterBufferRef *picref) select->select = select_frame(inlink->dst, picref); if (select->select) { + AVFilterBufferRef *buf_out; /* frame was requested through poll_frame */ if (select->cache_frames) { if (!av_fifo_space(select->pending_frames)) @@ -243,7 +244,10 @@ static int start_frame(AVFilterLink *inlink, AVFilterBufferRef *picref) sizeof(picref), NULL); return 0; } - return ff_start_frame(inlink->dst->outputs[0], avfilter_ref_buffer(picref, ~0)); + buf_out = avfilter_ref_buffer(picref, ~0); + if (!buf_out) + return AVERROR(ENOMEM); + return ff_start_frame(inlink->dst->outputs[0], buf_out); } return 0; |