lavfi: add error handling to draw_slice().

This commit is contained in:
Anton Khirnov
2012-07-14 09:25:33 +02:00
parent ebc8d97481
commit e9b992d035
30 changed files with 128 additions and 72 deletions
+8 -4
View File
@@ -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)