aboutsummaryrefslogtreecommitdiffstats
path: root/libavfilter/vf_frei0r.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2012-07-14 09:25:33 +0200
committerAnton Khirnov <anton@khirnov.net>2012-07-22 09:14:05 +0200
commitd4f89906e3b310609b636cf6071313ec557ec873 (patch)
treeaf879b33d3d8b1fdf14c517bfb1317f349042b15 /libavfilter/vf_frei0r.c
parente9b992d035b58209d66115bd7d964741dd31d592 (diff)
downloadffmpeg-d4f89906e3b310609b636cf6071313ec557ec873.tar.gz
lavfi: add error handling to end_frame().
Diffstat (limited to 'libavfilter/vf_frei0r.c')
-rw-r--r--libavfilter/vf_frei0r.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/libavfilter/vf_frei0r.c b/libavfilter/vf_frei0r.c
index 21221e1ed8..4721779348 100644
--- a/libavfilter/vf_frei0r.c
+++ b/libavfilter/vf_frei0r.c
@@ -345,18 +345,21 @@ static int null_draw_slice(AVFilterLink *inlink, int y, int h, int slice_dir)
return 0;
}
-static void end_frame(AVFilterLink *inlink)
+static int end_frame(AVFilterLink *inlink)
{
Frei0rContext *frei0r = inlink->dst->priv;
AVFilterLink *outlink = inlink->dst->outputs[0];
AVFilterBufferRef *inpicref = inlink->cur_buf;
AVFilterBufferRef *outpicref = outlink->out_buf;
+ int ret;
frei0r->update(frei0r->instance, inpicref->pts * av_q2d(inlink->time_base) * 1000,
(const uint32_t *)inpicref->data[0],
(uint32_t *)outpicref->data[0]);
- ff_draw_slice(outlink, 0, outlink->h, 1);
- ff_end_frame(outlink);
+ if ((ret = ff_draw_slice(outlink, 0, outlink->h, 1)) ||
+ (ret = ff_end_frame(outlink)) < 0)
+ return ret;
+ return 0;
}
AVFilter avfilter_vf_frei0r = {