diff options
author | Anton Khirnov <anton@khirnov.net> | 2012-07-14 09:25:33 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2012-07-22 09:14:05 +0200 |
commit | d4f89906e3b310609b636cf6071313ec557ec873 (patch) | |
tree | af879b33d3d8b1fdf14c517bfb1317f349042b15 /libavfilter/video.c | |
parent | e9b992d035b58209d66115bd7d964741dd31d592 (diff) | |
download | ffmpeg-d4f89906e3b310609b636cf6071313ec557ec873.tar.gz |
lavfi: add error handling to end_frame().
Diffstat (limited to 'libavfilter/video.c')
-rw-r--r-- | libavfilter/video.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/libavfilter/video.c b/libavfilter/video.c index ffcc2347fc..8dd5bf4272 100644 --- a/libavfilter/video.c +++ b/libavfilter/video.c @@ -234,12 +234,12 @@ int ff_start_frame(AVFilterLink *link, AVFilterBufferRef *picref) return ret; } -void ff_null_end_frame(AVFilterLink *link) +int ff_null_end_frame(AVFilterLink *link) { - ff_end_frame(link->dst->outputs[0]); + return ff_end_frame(link->dst->outputs[0]); } -static void default_end_frame(AVFilterLink *inlink) +static int default_end_frame(AVFilterLink *inlink) { AVFilterLink *outlink = NULL; @@ -247,20 +247,24 @@ static void default_end_frame(AVFilterLink *inlink) outlink = inlink->dst->outputs[0]; if (outlink) { - ff_end_frame(outlink); + return ff_end_frame(outlink); } + return 0; } -void ff_end_frame(AVFilterLink *link) +int ff_end_frame(AVFilterLink *link) { - void (*end_frame)(AVFilterLink *); + int (*end_frame)(AVFilterLink *); + int ret; if (!(end_frame = link->dstpad->end_frame)) end_frame = default_end_frame; - end_frame(link); + ret = end_frame(link); clear_link(link); + + return ret; } int ff_null_draw_slice(AVFilterLink *link, int y, int h, int slice_dir) |