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

Paul B Mahol git at videolan.org
Sat Apr 30 16:39:54 EEST 2022


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Sat Apr 30 15:38:38 2022 +0200| [9aa20d28cdda0dcaa4daa2848670a6530c6ba26a] | committer: Paul B Mahol

avfilter/af_aspectralstats: request new frames only when needed

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

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

diff --git a/libavfilter/af_aspectralstats.c b/libavfilter/af_aspectralstats.c
index bc578bdcc1..cac5d01bca 100644
--- a/libavfilter/af_aspectralstats.c
+++ b/libavfilter/af_aspectralstats.c
@@ -502,6 +502,11 @@ static int activate(AVFilterContext *ctx)
     if (ret < 0)
         return ret;
 
+    if (ff_inlink_queued_samples(inlink) >= s->hop_size) {
+        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