if (ret == AVERROR_EOF && !ctx->is_disabled && s->nb_frames > 0) {
AVFrame *out = s->frames[s->nb_frames - 1];
if (ret == AVERROR_EOF && !ctx->is_disabled && s->nb_frames > 0) {
AVFrame *out = s->frames[s->nb_frames - 1];
out->pts = s->pts[s->flush_idx++];
ret = ff_filter_frame(outlink, out);
s->frames[s->nb_frames - 1] = NULL;
out->pts = s->pts[s->flush_idx++];
ret = ff_filter_frame(outlink, out);
s->frames[s->nb_frames - 1] = NULL;
.name = "random",
.description = NULL_IF_CONFIG_SMALL("Return random frames."),
.priv_size = sizeof(RandomContext),
.priv_class = &random_class,
.init = init,
.name = "random",
.description = NULL_IF_CONFIG_SMALL("Return random frames."),
.priv_size = sizeof(RandomContext),
.priv_class = &random_class,
.init = init,