Commit 35bcbfd6 authored by Paul B Mahol's avatar Paul B Mahol

avfilter/f_interleave: no need to check for inlink eof if non-empty queue

Also set state to ready if there is any inlink with queued frame.
parent ec3b5dea
...@@ -70,11 +70,9 @@ static int activate(AVFilterContext *ctx) ...@@ -70,11 +70,9 @@ static int activate(AVFilterContext *ctx)
FF_FILTER_FORWARD_STATUS_BACK_ALL(outlink, ctx); FF_FILTER_FORWARD_STATUS_BACK_ALL(outlink, ctx);
for (i = 0; i < ctx->nb_inputs; i++) { for (i = 0; i < ctx->nb_inputs; i++) {
if (!ff_outlink_get_status(ctx->inputs[i])) { if (!ff_inlink_queued_frames(ctx->inputs[i]))
if (!ff_inlink_queued_frames(ctx->inputs[i])) continue;
break; nb_inputs_with_frames++;
nb_inputs_with_frames++;
}
} }
if (nb_inputs_with_frames > 0) { if (nb_inputs_with_frames > 0) {
...@@ -137,6 +135,11 @@ static int activate(AVFilterContext *ctx) ...@@ -137,6 +135,11 @@ static int activate(AVFilterContext *ctx)
} }
} }
if (i) {
ff_filter_set_ready(ctx, 100);
return 0;
}
return FFERROR_NOT_READY; return FFERROR_NOT_READY;
} }
......
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