summaryrefslogtreecommitdiff
path: root/libavfilter/avf_showspectrum.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-08-15 21:33:25 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-08-15 21:33:25 +0200
commit1b20853fb3e2c4879cdecf2414a2d68760df1149 (patch)
tree131de80408a5a252609a067b2ab1d086b30ef2b5 /libavfilter/avf_showspectrum.c
parent32b56af6fb9f97749ad091c9373d399e4678457d (diff)
avfilter/internal: Factor out executing a filter's execute_func
The current way of doing it involves writing the ctx parameter twice. Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavfilter/avf_showspectrum.c')
-rw-r--r--libavfilter/avf_showspectrum.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/libavfilter/avf_showspectrum.c b/libavfilter/avf_showspectrum.c
index 26d8c79a72..6ae4c89d77 100644
--- a/libavfilter/avf_showspectrum.c
+++ b/libavfilter/avf_showspectrum.c
@@ -1412,7 +1412,7 @@ static int plot_spectrum_column(AVFilterLink *inlink, AVFrame *insamples)
/* initialize buffer for combining to black */
clear_combine_buffer(s, z);
- ctx->internal->execute(ctx, s->plot_channel, NULL, NULL, s->nb_display_channels);
+ ff_filter_execute(ctx, s->plot_channel, NULL, NULL, s->nb_display_channels);
for (y = 0; y < z * 3; y++) {
for (x = 0; x < s->nb_display_channels; x++) {
@@ -1586,16 +1586,16 @@ static int activate(AVFilterContext *ctx)
av_assert0(fin->nb_samples == s->win_size);
- ctx->internal->execute(ctx, run_channel_fft, fin, NULL, s->nb_display_channels);
+ ff_filter_execute(ctx, run_channel_fft, fin, NULL, s->nb_display_channels);
if (s->data == D_MAGNITUDE)
- ctx->internal->execute(ctx, calc_channel_magnitudes, NULL, NULL, s->nb_display_channels);
+ ff_filter_execute(ctx, calc_channel_magnitudes, NULL, NULL, s->nb_display_channels);
if (s->data == D_PHASE)
- ctx->internal->execute(ctx, calc_channel_phases, NULL, NULL, s->nb_display_channels);
+ ff_filter_execute(ctx, calc_channel_phases, NULL, NULL, s->nb_display_channels);
if (s->data == D_UPHASE)
- ctx->internal->execute(ctx, calc_channel_uphases, NULL, NULL, s->nb_display_channels);
+ ff_filter_execute(ctx, calc_channel_uphases, NULL, NULL, s->nb_display_channels);
ret = plot_spectrum_column(inlink, fin);
@@ -1792,7 +1792,7 @@ static int showspectrumpic_request_frame(AVFilterLink *outlink)
}
}
- ctx->internal->execute(ctx, run_channel_fft, fin, NULL, s->nb_display_channels);
+ ff_filter_execute(ctx, run_channel_fft, fin, NULL, s->nb_display_channels);
acalc_magnitudes(s);
consumed += spf;