[FFmpeg-cvslog] avfilter/af_afftfilt: add timeline support

Paul B Mahol git at videolan.org
Sun Sep 12 14:29:16 EEST 2021


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Sun Sep 12 13:24:49 2021 +0200| [485a52e6184f5e0869ff2ff215daedac259e344c] | committer: Paul B Mahol

avfilter/af_afftfilt: add timeline support

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

 libavfilter/af_afftfilt.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/libavfilter/af_afftfilt.c b/libavfilter/af_afftfilt.c
index de54c13135..26a077ad5f 100644
--- a/libavfilter/af_afftfilt.c
+++ b/libavfilter/af_afftfilt.c
@@ -298,6 +298,12 @@ static int filter_frame(AVFilterLink *inlink)
         int x;
         values[VAR_CHANNEL] = ch;
 
+        if (ctx->is_disabled) {
+            for (n = 0; n <= window_size / 2; n++) {
+                fft_temp[n].re = fft_out[n].re;
+                fft_temp[n].im = fft_out[n].im;
+            }
+        } else {
         for (n = 0; n <= window_size / 2; n++) {
             float fr, fi;
 
@@ -311,6 +317,7 @@ static int filter_frame(AVFilterLink *inlink)
             fft_temp[n].re = fr;
             fft_temp[n].im = fi;
         }
+        }
 
         for (n = window_size / 2 + 1, x = window_size / 2 - 1; n < window_size; n++, x--) {
             fft_temp[n].re =  fft_temp[x].re;
@@ -485,4 +492,5 @@ const AVFilter ff_af_afftfilt = {
     .activate        = activate,
     .query_formats   = query_formats,
     .uninit          = uninit,
+    .flags           = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL,
 };



More information about the ffmpeg-cvslog mailing list