@@ -1645,6 +1645,14 @@ void ff_link_process_timeline(AVFilterLink *link, const AVFrame *frame)
dstctx->is_disabled = fabs(av_expr_eval(dstctx->enable, dstctx->var_values, NULL)) < 0.5;
}
+void ff_link_set_frame_wanted(AVFilterLink *link)
+{
+ av_assert1(!link->status_in);
+ av_assert1(!link->status_out);
+ link->frame_wanted_out = 1;
+ ff_filter_set_ready(link->src, 100);
+}
+
const AVClass *avfilter_get_class(void)
{
return &avfilter_class;
@@ -690,4 +690,12 @@ void ff_link_process_commands(AVFilterLink *link, const AVFrame *frame);
*/
void ff_link_process_timeline(AVFilterLink *link, const AVFrame *frame);
+/**
+ * Mark that a frame is wanted on the link.
+ * Unlike ff_filter_frame(), it must not be called when the link has a
+ * non-zero status, and thus does not acknowledge it.
+ * Also it cannot fail.
+ */
+void ff_link_set_frame_wanted(AVFilterLink *link);
+
#endif /* AVFILTER_INTERNAL_H */
Signed-off-by: Nicolas George <george@nsup.org> --- libavfilter/avfilter.c | 8 ++++++++ libavfilter/internal.h | 8 ++++++++ 2 files changed, 16 insertions(+)