- AVFilterContext *ctx = outlink->src;
- MixContext *s = ctx->priv;
- int ret;
- int wanted_samples;
-
- ret = calc_active_inputs(s);
- if (ret < 0)
- return ret;
-
- if (!(s->input_state[0] & INPUT_ON))
- return request_samples(ctx, 1);
-
- if (s->frame_list->nb_frames == 0) {
- ret = ff_request_frame(ctx->inputs[0]);
- if (ret == AVERROR_EOF) {
- s->input_state[0] = 0;
- if (s->nb_inputs == 1)
- return AVERROR_EOF;
- return output_frame(ctx->outputs[0], 1);
- }
- return ret;
- }
- av_assert0(s->frame_list->nb_frames > 0);