aboutsummaryrefslogtreecommitdiffstats
path: root/libavfilter
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2021-09-12 13:24:49 +0200
committerPaul B Mahol <onemda@gmail.com>2021-09-12 13:28:12 +0200
commit485a52e6184f5e0869ff2ff215daedac259e344c (patch)
treead0812dc429ed0b415c04e38bf79fc8323b6d78a /libavfilter
parent94d4cc24c314393b5df26ab800b3ccf50366bc60 (diff)
downloadffmpeg-485a52e6184f5e0869ff2ff215daedac259e344c.tar.gz
avfilter/af_afftfilt: add timeline support
Diffstat (limited to 'libavfilter')
-rw-r--r--libavfilter/af_afftfilt.c8
1 files changed, 8 insertions, 0 deletions
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,
};