[FFmpeg-cvslog] avfilter/avf_showcwt: use av_rescale()

Paul B Mahol git at videolan.org
Mon Jul 10 19:53:11 EEST 2023


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Mon Jul 10 10:24:52 2023 +0200| [2c4fa968b60d64dc257286c7a808c26848f7bf82] | committer: Paul B Mahol

avfilter/avf_showcwt: use av_rescale()

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

 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 ff2c06fb7a..505c66e3ab 100644
--- a/libavfilter/avf_showcwt.c
+++ b/libavfilter/avf_showcwt.c
@@ -590,7 +590,7 @@ static int config_output(AVFilterLink *outlink)
     s->input_sample_count = s->nb_consumed_samples;
     s->hop_size = s->nb_consumed_samples >> 1;
     s->input_padding_size = 65536;
-    s->output_padding_size = FFMAX(16, s->input_padding_size * s->pps / inlink->sample_rate);
+    s->output_padding_size = FFMAX(16, av_rescale(s->input_padding_size, s->pps, inlink->sample_rate));
 
     outlink->w = s->w;
     outlink->h = s->h;



More information about the ffmpeg-cvslog mailing list