Also set state to ready if there is any inlink with queued frame.
Unified · Split
| @@ -70,11 +70,9 @@ static int activate(AVFilterContext *ctx) · 69 unmodified lines | |||
| 70 | FF_FILTER_FORWARD_STATUS_BACK_ALL(outlink, ctx); | 70 | FF_FILTER_FORWARD_STATUS_BACK_ALL(outlink, ctx); |
| 71 | 71 | ||
| 72 | for (i = 0; i < ctx->nb_inputs; i++) { | 72 | for (i = 0; i < ctx->nb_inputs; i++) { |
| 73 | if (!ff_outlink_get_status(ctx->inputs[i])) { | 73 | if (!ff_inlink_queued_frames(ctx->inputs[i])) |
| 74 | if (!ff_inlink_queued_frames(ctx->inputs[i])) | 74 | continue; |
| 75 | break; | 75 | nb_inputs_with_frames++; |
| 76 | nb_inputs_with_frames++; | ||
| 77 | } | ||
| 78 | } | 76 | } |
| 79 | 77 | ||
| 80 | if (nb_inputs_with_frames > 0) { | 78 | if (nb_inputs_with_frames > 0) { |
| @@ -137,6 +135,11 @@ static int activate(AVFilterContext *ctx) · 56 unmodified lines | |||
| 137 | } | 135 | } |
| 138 | } | 136 | } |
| 139 | 137 | ||
| 138 | if (i) { | ||
| 139 | ff_filter_set_ready(ctx, 100); | ||
| 140 | return 0; | ||
| 141 | } | ||
| 142 | |||
| 140 | return FFERROR_NOT_READY; | 143 | return FFERROR_NOT_READY; |
| 141 | } | 144 | } |
| 142 | 145 | ||