diff options
author | Anton Khirnov <anton@khirnov.net> | 2012-07-15 09:47:01 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2012-07-22 09:14:05 +0200 |
commit | 3825b5268844694ff50a0e0bfde64df43a862fae (patch) | |
tree | 3cb8456333c0a5a1af8f7d2c557174181ff1c6c5 /libavfilter/vf_select.c | |
parent | d4f89906e3b310609b636cf6071313ec557ec873 (diff) | |
download | ffmpeg-3825b5268844694ff50a0e0bfde64df43a862fae.tar.gz |
lavfi: check all ff_start_frame/draw_slice/end_frame calls for errors
Diffstat (limited to 'libavfilter/vf_select.c')
-rw-r--r-- | libavfilter/vf_select.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/libavfilter/vf_select.c b/libavfilter/vf_select.c index b9e053fc03..d4cfbe9ceb 100644 --- a/libavfilter/vf_select.c +++ b/libavfilter/vf_select.c @@ -279,12 +279,15 @@ static int request_frame(AVFilterLink *outlink) if (av_fifo_size(select->pending_frames)) { AVFilterBufferRef *picref; + int ret; + av_fifo_generic_read(select->pending_frames, &picref, sizeof(picref), NULL); - ff_start_frame(outlink, avfilter_ref_buffer(picref, ~0)); - ff_draw_slice(outlink, 0, outlink->h, 1); - ff_end_frame(outlink); + if ((ret = ff_start_frame(outlink, avfilter_ref_buffer(picref, ~0))) < 0 || + (ret = ff_draw_slice(outlink, 0, outlink->h, 1)) < 0 || + (ret = ff_end_frame(outlink)) < 0); + avfilter_unref_buffer(picref); - return 0; + return ret; } while (!select->select) { |