[FFmpeg-cvslog] avfilter/avf_avectorscope: request new frames only when needed

Paul B Mahol git at videolan.org
Sat Apr 30 17:18:46 EEST 2022


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Sat Apr 30 16:15:43 2022 +0200| [3ce4e0808924c55cbb387a6249bcb1e82ea44f63] | committer: Paul B Mahol

avfilter/avf_avectorscope: request new frames only when needed

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

 libavfilter/avf_avectorscope.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/libavfilter/avf_avectorscope.c b/libavfilter/avf_avectorscope.c
index 200b2e452c..fe381a631d 100644
--- a/libavfilter/avf_avectorscope.c
+++ b/libavfilter/avf_avectorscope.c
@@ -414,6 +414,11 @@ static int activate(AVFilterContext *ctx)
     if (ret > 0)
         return filter_frame(inlink, in);
 
+    if (ff_inlink_queued_samples(inlink) >= s->nb_samples) {
+        ff_filter_set_ready(ctx, 10);
+        return 0;
+    }
+
     FF_FILTER_FORWARD_STATUS(inlink, outlink);
     FF_FILTER_FORWARD_WANTED(outlink, inlink);
 



More information about the ffmpeg-cvslog mailing list