You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
avfilter/af_afftdn: switch to internal timeline
This commit is contained in:
@@ -1165,6 +1165,7 @@ static int output_frame(AVFilterLink *inlink)
|
|||||||
AVFilterContext *ctx = inlink->dst;
|
AVFilterContext *ctx = inlink->dst;
|
||||||
AVFilterLink *outlink = ctx->outputs[0];
|
AVFilterLink *outlink = ctx->outputs[0];
|
||||||
AudioFFTDeNoiseContext *s = ctx->priv;
|
AudioFFTDeNoiseContext *s = ctx->priv;
|
||||||
|
const int output_mode = ctx->is_disabled ? IN_MODE : s->output_mode;
|
||||||
AVFrame *out = NULL, *in = NULL;
|
AVFrame *out = NULL, *in = NULL;
|
||||||
ThreadData td;
|
ThreadData td;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
@@ -1238,7 +1239,7 @@ static int output_frame(AVFilterLink *inlink)
|
|||||||
float *orig = (float *)in->extended_data[ch];
|
float *orig = (float *)in->extended_data[ch];
|
||||||
float *dst = (float *)out->extended_data[ch];
|
float *dst = (float *)out->extended_data[ch];
|
||||||
|
|
||||||
switch (s->output_mode) {
|
switch (output_mode) {
|
||||||
case IN_MODE:
|
case IN_MODE:
|
||||||
for (int m = 0; m < s->sample_advance; m++)
|
for (int m = 0; m < s->sample_advance; m++)
|
||||||
dst[m] = orig[m];
|
dst[m] = orig[m];
|
||||||
@@ -1419,6 +1420,6 @@ const AVFilter ff_af_afftdn = {
|
|||||||
FILTER_INPUTS(inputs),
|
FILTER_INPUTS(inputs),
|
||||||
FILTER_OUTPUTS(outputs),
|
FILTER_OUTPUTS(outputs),
|
||||||
.process_command = process_command,
|
.process_command = process_command,
|
||||||
.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC |
|
.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL |
|
||||||
AVFILTER_FLAG_SLICE_THREADS,
|
AVFILTER_FLAG_SLICE_THREADS,
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user