Commit a45e96a5 authored by Nicolas George's avatar Nicolas George

lavfi/vf_alphamerge: remove looping on request_frame().

parent 8a2e2fc3
...@@ -36,7 +36,6 @@ ...@@ -36,7 +36,6 @@
enum { Y, U, V, A }; enum { Y, U, V, A };
typedef struct { typedef struct {
int frame_requested;
int is_packed_rgb; int is_packed_rgb;
uint8_t rgba_map[4]; uint8_t rgba_map[4];
struct FFBufQueue queue_main; struct FFBufQueue queue_main;
...@@ -146,7 +145,6 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *buf) ...@@ -146,7 +145,6 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *buf)
main_buf = ff_bufqueue_get(&merge->queue_main); main_buf = ff_bufqueue_get(&merge->queue_main);
alpha_buf = ff_bufqueue_get(&merge->queue_alpha); alpha_buf = ff_bufqueue_get(&merge->queue_alpha);
merge->frame_requested = 0;
draw_frame(ctx, main_buf, alpha_buf); draw_frame(ctx, main_buf, alpha_buf);
ret = ff_filter_frame(ctx->outputs[0], main_buf); ret = ff_filter_frame(ctx->outputs[0], main_buf);
av_frame_free(&alpha_buf); av_frame_free(&alpha_buf);
...@@ -160,13 +158,11 @@ static int request_frame(AVFilterLink *outlink) ...@@ -160,13 +158,11 @@ static int request_frame(AVFilterLink *outlink)
AlphaMergeContext *merge = ctx->priv; AlphaMergeContext *merge = ctx->priv;
int in, ret; int in, ret;
merge->frame_requested = 1; /* TODO reindent */
while (merge->frame_requested) {
in = ff_bufqueue_peek(&merge->queue_main, 0) ? 1 : 0; in = ff_bufqueue_peek(&merge->queue_main, 0) ? 1 : 0;
ret = ff_request_frame(ctx->inputs[in]); ret = ff_request_frame(ctx->inputs[in]);
if (ret < 0) if (ret < 0)
return ret; return ret;
}
return 0; return 0;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment