diff options
author | Nicolas George <nicolas.george@normalesup.org> | 2013-03-31 19:19:35 +0200 |
---|---|---|
committer | Nicolas George <nicolas.george@normalesup.org> | 2013-04-03 17:44:10 +0200 |
commit | 77fa554b6e083191fab7f6aea596a93f2a389da7 (patch) | |
tree | d4a7c5cfee789d636a14126d31b1376d66a92d6a /libavfilter | |
parent | 69d67fb622b67b2f978725d5fc07ab1571e632dd (diff) | |
download | ffmpeg-77fa554b6e083191fab7f6aea596a93f2a389da7.tar.gz |
lavfi/vf_tile: simplify request_frame loop.
Diffstat (limited to 'libavfilter')
-rw-r--r-- | libavfilter/vf_tile.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/libavfilter/vf_tile.c b/libavfilter/vf_tile.c index b45cbb81bb..64bf97076c 100644 --- a/libavfilter/vf_tile.c +++ b/libavfilter/vf_tile.c @@ -116,6 +116,8 @@ static int config_props(AVFilterLink *outlink) /* 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 }); + outlink->flags |= FF_LINK_FLAG_REQUEST_LOOP; + return 0; } @@ -203,16 +205,9 @@ static int request_frame(AVFilterLink *outlink) AVFilterLink *inlink = ctx->inputs[0]; int r; - while (1) { - r = ff_request_frame(inlink); - if (r < 0) { - if (r == AVERROR_EOF && tile->current) - r = end_last_frame(ctx); - break; - } - if (!tile->current) /* done */ - break; - } + r = ff_request_frame(inlink); + if (r == AVERROR_EOF && tile->current) + r = end_last_frame(ctx); return r; } |