summaryrefslogtreecommitdiff
path: root/libavfilter/af_anlms.c
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2022-04-27 13:30:49 +0200
committerPaul B Mahol <onemda@gmail.com>2022-04-27 21:30:43 +0200
commit14b74610d7e6e471801fe755aa0840c9f2d4ecb4 (patch)
treeff0dc08c763a677e0c9a38115663cf41f4e7b776 /libavfilter/af_anlms.c
parent4fc806bbe612784286f123af92a0d5d0da333064 (diff)
avfilter/af_anlms: add timeline support
Diffstat (limited to 'libavfilter/af_anlms.c')
-rw-r--r--libavfilter/af_anlms.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/libavfilter/af_anlms.c b/libavfilter/af_anlms.c
index 50bb0c7f42..6658cd2940 100644
--- a/libavfilter/af_anlms.c
+++ b/libavfilter/af_anlms.c
@@ -168,8 +168,11 @@ static int process_channels(AVFilterContext *ctx, void *arg, int jobnr, int nb_j
int *offset = (int *)s->offset->extended_data[c];
float *output = (float *)out->extended_data[c];
- for (int n = 0; n < out->nb_samples; n++)
+ for (int n = 0; n < out->nb_samples; n++) {
output[n] = process_sample(s, input[n], desired[n], delay, coeffs, tmp, offset);
+ if (ctx->is_disabled)
+ output[n] = input[n];
+ }
}
return 0;
@@ -314,7 +317,8 @@ const AVFilter ff_af_anlms = {
FILTER_INPUTS(inputs),
FILTER_OUTPUTS(outputs),
FILTER_QUERY_FUNC(query_formats),
- .flags = AVFILTER_FLAG_SLICE_THREADS,
+ .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL |
+ AVFILTER_FLAG_SLICE_THREADS,
.process_command = ff_filter_process_command,
};
@@ -329,6 +333,7 @@ const AVFilter ff_af_anlmf = {
FILTER_INPUTS(inputs),
FILTER_OUTPUTS(outputs),
FILTER_QUERY_FUNC(query_formats),
- .flags = AVFILTER_FLAG_SLICE_THREADS,
+ .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL |
+ AVFILTER_FLAG_SLICE_THREADS,
.process_command = ff_filter_process_command,
};