aboutsummaryrefslogtreecommitdiffstats
path: root/libavfilter/vf_delogo.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_delogo.c
parente9b992d035b58209d66115bd7d964741dd31d592 (diff)
downloadffmpeg-d4f89906e3b310609b636cf6071313ec557ec873.tar.gz
lavfi: add error handling to end_frame().
Diffstat (limited to 'libavfilter/vf_delogo.c')
-rw-r--r--libavfilter/vf_delogo.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/libavfilter/vf_delogo.c b/libavfilter/vf_delogo.c
index 6e77cf19a8..81f33b727e 100644
--- a/libavfilter/vf_delogo.c
+++ b/libavfilter/vf_delogo.c
@@ -250,7 +250,7 @@ static int null_draw_slice(AVFilterLink *link, int y, int h, int slice_dir)
return 0;
}
-static void end_frame(AVFilterLink *inlink)
+static int end_frame(AVFilterLink *inlink)
{
DelogoContext *delogo = inlink->dst->priv;
AVFilterLink *outlink = inlink->dst->outputs[0];
@@ -260,6 +260,7 @@ static void end_frame(AVFilterLink *inlink)
int hsub0 = av_pix_fmt_descriptors[inlink->format].log2_chroma_w;
int vsub0 = av_pix_fmt_descriptors[inlink->format].log2_chroma_h;
int plane;
+ int ret;
for (plane = 0; plane < 4 && inpicref->data[plane]; plane++) {
int hsub = plane == 1 || plane == 2 ? hsub0 : 0;
@@ -274,8 +275,10 @@ static void end_frame(AVFilterLink *inlink)
delogo->show, direct);
}
- ff_draw_slice(outlink, 0, inlink->h, 1);
- ff_end_frame(outlink);
+ if ((ret = ff_draw_slice(outlink, 0, inlink->h, 1)) < 0 ||
+ (ret = ff_end_frame(outlink)) < 0)
+ return ret;
+ return 0;
}
AVFilter avfilter_vf_delogo = {