aboutsummaryrefslogtreecommitdiffstats
path: root/libavfilter
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2023-07-22 17:16:33 +0200
committerPaul B Mahol <onemda@gmail.com>2023-07-22 18:05:38 +0200
commitc24c7bcc951056c2a47bbb292edb56737fb436da (patch)
tree0c6fd9c7d7ecd5e19f8d4dd394fe96daa966efb1 /libavfilter
parente6168e43a2eec4757cc8d7f981f9d29e1f12dbed (diff)
downloadffmpeg-c24c7bcc951056c2a47bbb292edb56737fb436da.tar.gz
avfilter/avf_showcwt: no need for big forward FFT with small sample rates
Diffstat (limited to 'libavfilter')
-rw-r--r--libavfilter/avf_showcwt.c2
1 files changed, 1 insertions, 1 deletions
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));