From e9b992d035b58209d66115bd7d964741dd31d592 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Sat, 14 Jul 2012 09:25:33 +0200 Subject: lavfi: add error handling to draw_slice(). --- libavfilter/split.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'libavfilter/split.c') diff --git a/libavfilter/split.c b/libavfilter/split.c index 5ffbc856f6..0ae0a60056 100644 --- a/libavfilter/split.c +++ b/libavfilter/split.c @@ -77,13 +77,17 @@ static int start_frame(AVFilterLink *inlink, AVFilterBufferRef *picref) return ret; } -static void draw_slice(AVFilterLink *inlink, int y, int h, int slice_dir) +static int draw_slice(AVFilterLink *inlink, int y, int h, int slice_dir) { AVFilterContext *ctx = inlink->dst; - int i; + int i, ret = 0; - for (i = 0; i < ctx->nb_outputs; i++) - ff_draw_slice(ctx->outputs[i], y, h, slice_dir); + for (i = 0; i < ctx->nb_outputs; i++) { + ret = ff_draw_slice(ctx->outputs[i], y, h, slice_dir); + if (ret < 0) + break; + } + return ret; } static void end_frame(AVFilterLink *inlink) -- cgit v1.2.1