[FFmpeg-cvslog] avfilter/af_surround: request new frames only when needed
Paul B Mahol
git at videolan.org
Sat Apr 30 16:39:52 EEST 2022
ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Sat Apr 30 15:36:39 2022 +0200| [a9e9020ff6eb92fb36b35a53c27719aeedfc6a8a] | committer: Paul B Mahol
avfilter/af_surround: request new frames only when needed
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a9e9020ff6eb92fb36b35a53c27719aeedfc6a8a
---
libavfilter/af_surround.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/libavfilter/af_surround.c b/libavfilter/af_surround.c
index 4599dd1601..858fed609a 100644
--- a/libavfilter/af_surround.c
+++ b/libavfilter/af_surround.c
@@ -1633,6 +1633,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;
+ }
+
if (ff_inlink_acknowledge_status(inlink, &status, &pts)) {
ff_outlink_set_status(outlink, status, pts);
return 0;
More information about the ffmpeg-cvslog
mailing list