Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2022-02-27 13:52:00 +0300
committerPaul B Mahol <onemda@gmail.com>2022-02-27 14:04:21 +0300
commit592cef61353b1712745a121c68df0c26178db86c (patch)
tree5f55662e4338073241c4db65402d546df3d15be8 /libavfilter/af_afftdn.c
parent2cb482aa7491f15fe8e62c9f366cb25b6ce7db17 (diff)
avfilter/af_afftdn: remove ThreadData struct code
Diffstat (limited to 'libavfilter/af_afftdn.c')
-rw-r--r--libavfilter/af_afftdn.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/libavfilter/af_afftdn.c b/libavfilter/af_afftdn.c
index d7db625c35..628336b18b 100644
--- a/libavfilter/af_afftdn.c
+++ b/libavfilter/af_afftdn.c
@@ -1083,15 +1083,10 @@ static void set_noise_profile(AudioFFTDeNoiseContext *s,
s->noise_floor = new_noise_floor;
}
-typedef struct ThreadData {
- AVFrame *in;
-} ThreadData;
-
static int filter_channel(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
{
AudioFFTDeNoiseContext *s = ctx->priv;
- ThreadData *td = arg;
- AVFrame *in = td->in;
+ AVFrame *in = arg;
const int start = (in->channels * jobnr) / nb_jobs;
const int end = (in->channels * (jobnr+1)) / nb_jobs;
@@ -1165,7 +1160,6 @@ static int output_frame(AVFilterLink *inlink, AVFrame *in)
const int output_mode = ctx->is_disabled ? IN_MODE : s->output_mode;
const int offset = s->window_length - s->sample_advance;
AVFrame *out;
- ThreadData td;
for (int ch = 0; ch < s->channels; ch++) {
float *src = (float *)s->winframe->extended_data[ch];
@@ -1220,8 +1214,7 @@ static int output_frame(AVFilterLink *inlink, AVFrame *in)
}
s->block_count++;
- td.in = s->winframe;
- ff_filter_execute(ctx, filter_channel, &td, NULL,
+ ff_filter_execute(ctx, filter_channel, s->winframe, NULL,
FFMIN(outlink->channels, ff_filter_get_nb_threads(ctx)));
if (av_frame_is_writable(in)) {