From c24c7bcc951056c2a47bbb292edb56737fb436da Mon Sep 17 00:00:00 2001 From: Paul B Mahol Date: Sat, 22 Jul 2023 17:16:33 +0200 Subject: [PATCH] avfilter/avf_showcwt: no need for big forward FFT with small sample rates --- libavfilter/avf_showcwt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavfilter/avf_showcwt.c b/libavfilter/avf_showcwt.c index ef6798e9cf..d83aad57f5 100644 --- a/libavfilter/avf_showcwt.c +++ b/libavfilter/avf_showcwt.c @@ -709,7 +709,7 @@ static int config_output(AVFilterLink *outlink) s->nb_channels = inlink->ch_layout.nb_channels; s->old_pts = AV_NOPTS_VALUE; s->eof_pts = AV_NOPTS_VALUE; - s->nb_consumed_samples = 65536; + s->nb_consumed_samples = FFMIN(65536, inlink->sample_rate); s->input_sample_count = s->nb_consumed_samples; s->input_padding_size = 1 << (32 - ff_clz(s->input_sample_count));