int av_buffersrc_close(AVFilterContext *ctx, int64_t pts, unsigned flags) { BufferSourceContext *s = ctx->priv; s->eof = 1; ff_avfilter_link_set_in_status(ctx->outputs[0], AVERROR_EOF, pts); return (flags & AV_BUFFERSRC_FLAG_PUSH) ? push_frame(ctx->graph) : 0; }
int ff_request_frame_to_filter(AVFilterLink *link) { int ret = -1; FF_TPRINTF_START(NULL, request_frame_to_filter); ff_tlog_link(NULL, link, 1); /* Assume the filter is blocked, let the method clear it if not */ link->frame_blocked_in = 1; if (link->srcpad->request_frame) ret = link->srcpad->request_frame(link); else if (link->src->inputs[0]) ret = ff_request_frame(link->src->inputs[0]); if (ret < 0) { if (ret != AVERROR(EAGAIN) && ret != link->status_in) ff_avfilter_link_set_in_status(link, ret, AV_NOPTS_VALUE); if (ret == AVERROR_EOF) ret = 0; } return ret; }