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/vf_scale.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'libavfilter/vf_scale.c') diff --git a/libavfilter/vf_scale.c b/libavfilter/vf_scale.c index 6c5421006b..73f31a65fd 100644 --- a/libavfilter/vf_scale.c +++ b/libavfilter/vf_scale.c @@ -291,16 +291,15 @@ static int start_frame(AVFilterLink *link, AVFilterBufferRef *picref) return 0; } -static void draw_slice(AVFilterLink *link, int y, int h, int slice_dir) +static int draw_slice(AVFilterLink *link, int y, int h, int slice_dir) { ScaleContext *scale = link->dst->priv; - int out_h; + int out_h, ret; AVFilterBufferRef *cur_pic = link->cur_buf; const uint8_t *data[4]; if (!scale->sws) { - ff_draw_slice(link->dst->outputs[0], y, h, slice_dir); - return; + return ff_draw_slice(link->dst->outputs[0], y, h, slice_dir); } if (scale->slice_y == 0 && slice_dir == -1) @@ -319,9 +318,10 @@ static void draw_slice(AVFilterLink *link, int y, int h, int slice_dir) if (slice_dir == -1) scale->slice_y -= out_h; - ff_draw_slice(link->dst->outputs[0], scale->slice_y, out_h, slice_dir); + ret = ff_draw_slice(link->dst->outputs[0], scale->slice_y, out_h, slice_dir); if (slice_dir == 1) scale->slice_y += out_h; + return ret; } AVFilter avfilter_vf_scale = { -- cgit v1.2.3