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/vsrc_testsrc.c | |
parent | d4f89906e3b310609b636cf6071313ec557ec873 (diff) |
lavfi: check all ff_start_frame/draw_slice/end_frame calls for errors
Diffstat (limited to 'libavfilter/vsrc_testsrc.c')
-rw-r--r-- | libavfilter/vsrc_testsrc.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/libavfilter/vsrc_testsrc.c b/libavfilter/vsrc_testsrc.c index 6de16768e8..22528b4650 100644 --- a/libavfilter/vsrc_testsrc.c +++ b/libavfilter/vsrc_testsrc.c @@ -130,6 +130,7 @@ static int request_frame(AVFilterLink *outlink) { TestSourceContext *test = outlink->src->priv; AVFilterBufferRef *picref; + int ret; if (test->max_pts >= 0 && test->pts > test->max_pts) return AVERROR_EOF; @@ -143,9 +144,10 @@ static int request_frame(AVFilterLink *outlink) test->nb_frame++; test->fill_picture_fn(outlink->src, picref); - ff_start_frame(outlink, picref); - ff_draw_slice(outlink, 0, test->h, 1); - ff_end_frame(outlink); + if ((ret = ff_start_frame(outlink, picref)) < 0 || + (ret = ff_draw_slice(outlink, 0, test->h, 1)) < 0 || + (ret = ff_end_frame(outlink)) < 0) + return ret; return 0; } |