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 | e9b992d035b58209d66115bd7d964741dd31d592 (patch) | |
tree | 6943fb7749c7930b1fde69fba8198d80a227f931 /libavfilter/vf_scale.c | |
parent | ebc8d974817fe456a0afe6867fdeb22c761fb04f (diff) |
lavfi: add error handling to draw_slice().
Diffstat (limited to 'libavfilter/vf_scale.c')
-rw-r--r-- | libavfilter/vf_scale.c | 10 |
1 files changed, 5 insertions, 5 deletions
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 = { |