[FFmpeg-cvslog] avfilter/avf_showcwt: no need for big forward FFT with small sample rates

Paul B Mahol git at videolan.org
Sat Jul 22 18:59:06 EEST 2023


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Sat Jul 22 17:16:33 2023 +0200| [c24c7bcc951056c2a47bbb292edb56737fb436da] | committer: Paul B Mahol

avfilter/avf_showcwt: no need for big forward FFT with small sample rates

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c24c7bcc951056c2a47bbb292edb56737fb436da
---

 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));



More information about the ffmpeg-cvslog mailing list