diff options
author | Paul B Mahol <onemda@gmail.com> | 2020-04-25 13:35:22 +0200 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2020-04-25 13:35:22 +0200 |
commit | 35bcbfd6da59ecb5288a6a823be731b4db30b365 (patch) | |
tree | b022bca4a5877c799ee191a833f3b6a9c1766f03 /libavfilter/f_interleave.c | |
parent | ec3b5deab43b00c9ed50b512c7ef52dd9f0887c6 (diff) |
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.
Diffstat (limited to 'libavfilter/f_interleave.c')
-rw-r--r-- | libavfilter/f_interleave.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/libavfilter/f_interleave.c b/libavfilter/f_interleave.c index c231b307c1..a18bbe79b3 100644 --- a/libavfilter/f_interleave.c +++ b/libavfilter/f_interleave.c @@ -70,11 +70,9 @@ static int activate(AVFilterContext *ctx) FF_FILTER_FORWARD_STATUS_BACK_ALL(outlink, ctx); for (i = 0; i < ctx->nb_inputs; i++) { - if (!ff_outlink_get_status(ctx->inputs[i])) { - if (!ff_inlink_queued_frames(ctx->inputs[i])) - break; - nb_inputs_with_frames++; - } + if (!ff_inlink_queued_frames(ctx->inputs[i])) + continue; + nb_inputs_with_frames++; } if (nb_inputs_with_frames > 0) { @@ -137,6 +135,11 @@ static int activate(AVFilterContext *ctx) } } + if (i) { + ff_filter_set_ready(ctx, 100); + return 0; + } + return FFERROR_NOT_READY; } |