[FFmpeg-cvslog] lavfi: disallow ff_request_frame for filters using activate.

Nicolas George git at videolan.org
Thu Jan 12 15:15:34 EET 2017


ffmpeg | branch: master | Nicolas George <george at nsup.org> | Sat Dec 24 13:16:15 2016 +0100| [ae4650f0b9cbb96b868038bafe632614832fe86f] | committer: Nicolas George

lavfi: disallow ff_request_frame for filters using activate.

Having two different functions allows to have stricter tests
and detect errors earlier.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ae4650f0b9cbb96b868038bafe632614832fe86f
---

 libavfilter/avfilter.c | 1 +
 libavfilter/internal.h | 3 +++
 2 files changed, 4 insertions(+)

diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c
index 75597d0..64a14d3 100644
--- a/libavfilter/avfilter.c
+++ b/libavfilter/avfilter.c
@@ -408,6 +408,7 @@ int ff_request_frame(AVFilterLink *link)
 {
     FF_TPRINTF_START(NULL, request_frame); ff_tlog_link(NULL, link, 1);
 
+    av_assert1(!link->dst->filter->activate);
     if (link->status_out)
         return link->status_out;
     if (link->status_in) {
diff --git a/libavfilter/internal.h b/libavfilter/internal.h
index a8b69fd..0407220 100644
--- a/libavfilter/internal.h
+++ b/libavfilter/internal.h
@@ -309,6 +309,9 @@ int ff_poll_frame(AVFilterLink *link);
 /**
  * Request an input frame from the filter at the other end of the link.
  *
+ * This function must not be used by filters using the activate callback,
+ * use ff_link_set_frame_wanted() instead.
+ *
  * The input filter may pass the request on to its inputs, fulfill the
  * request from an internal buffer or any other means specific to its function.
  *



More information about the ffmpeg-cvslog mailing list