lavfi/vf_tile: simplify request_frame loop.
This commit is contained in:
parent
69d67fb622
commit
77fa554b6e
@ -116,6 +116,8 @@ static int config_props(AVFilterLink *outlink)
|
|||||||
/* TODO make the color an option, or find an unified way of choosing it */
|
/* TODO make the color an option, or find an unified way of choosing it */
|
||||||
ff_draw_color(&tile->draw, &tile->blank, (uint8_t[]){ 0, 0, 0, -1 });
|
ff_draw_color(&tile->draw, &tile->blank, (uint8_t[]){ 0, 0, 0, -1 });
|
||||||
|
|
||||||
|
outlink->flags |= FF_LINK_FLAG_REQUEST_LOOP;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -203,16 +205,9 @@ static int request_frame(AVFilterLink *outlink)
|
|||||||
AVFilterLink *inlink = ctx->inputs[0];
|
AVFilterLink *inlink = ctx->inputs[0];
|
||||||
int r;
|
int r;
|
||||||
|
|
||||||
while (1) {
|
r = ff_request_frame(inlink);
|
||||||
r = ff_request_frame(inlink);
|
if (r == AVERROR_EOF && tile->current)
|
||||||
if (r < 0) {
|
r = end_last_frame(ctx);
|
||||||
if (r == AVERROR_EOF && tile->current)
|
|
||||||
r = end_last_frame(ctx);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
if (!tile->current) /* done */
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user