summaryrefslogtreecommitdiff
path: root/libavfilter/avf_avectorscope.c
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2022-04-30 16:15:43 +0200
committerPaul B Mahol <onemda@gmail.com>2022-04-30 16:20:38 +0200
commit3ce4e0808924c55cbb387a6249bcb1e82ea44f63 (patch)
treeffd60594d303ac366a4f6ab1550ebdba30886272 /libavfilter/avf_avectorscope.c
parent9aa20d28cdda0dcaa4daa2848670a6530c6ba26a (diff)
downloadffmpeg-3ce4e0808924c55cbb387a6249bcb1e82ea44f63.tar.gz
avfilter/avf_avectorscope: request new frames only when needed
Diffstat (limited to 'libavfilter/avf_avectorscope.c')
-rw-r--r--libavfilter/avf_avectorscope.c5
1 files changed, 5 insertions, 0 deletions
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);