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/fifo.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/fifo.c')
-rw-r--r-- | libavfilter/fifo.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/libavfilter/fifo.c b/libavfilter/fifo.c index 16a86b3565..66de62c3b0 100644 --- a/libavfilter/fifo.c +++ b/libavfilter/fifo.c @@ -241,9 +241,11 @@ static int request_frame(AVFilterLink *outlink) * so we don't have to worry about dereferencing it ourselves. */ switch (outlink->type) { case AVMEDIA_TYPE_VIDEO: - ff_start_frame(outlink, fifo->root.next->buf); - ff_draw_slice (outlink, 0, outlink->h, 1); - ff_end_frame (outlink); + if ((ret = ff_start_frame(outlink, fifo->root.next->buf)) < 0 || + (ret = ff_draw_slice(outlink, 0, outlink->h, 1)) < 0 || + (ret = ff_end_frame(outlink)) < 0) + return ret; + queue_pop(fifo); break; case AVMEDIA_TYPE_AUDIO: |