Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2019-05-28 12:07:47 +0300
committerPaul B Mahol <onemda@gmail.com>2019-05-28 12:07:47 +0300
commit62c8707e2ac1a7177455366f310d9af74daeff10 (patch)
tree66df412156b407ee0fbdab39a71f5623da5df917 /libavfilter/avf_showwaves.c
parentcd753968976deecdf2aac12f610b54f74f322c1e (diff)
avfilter/avf_showwaves: make use of av_rescale_q
Diffstat (limited to 'libavfilter/avf_showwaves.c')
-rw-r--r--libavfilter/avf_showwaves.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavfilter/avf_showwaves.c b/libavfilter/avf_showwaves.c
index a0d2b25d55..d85ebd9050 100644
--- a/libavfilter/avf_showwaves.c
+++ b/libavfilter/avf_showwaves.c
@@ -416,7 +416,7 @@ static int config_output(AVFilterLink *outlink)
showwaves->n = 1;
if (!showwaves->n)
- showwaves->n = FFMAX(1, ((double)inlink->sample_rate / (showwaves->w * av_q2d(showwaves->rate))) + 0.5);
+ showwaves->n = FFMAX(1, av_rescale_q(inlink->sample_rate, av_make_q(1, showwaves->w), showwaves->rate));
showwaves->buf_idx = 0;
if (!(showwaves->buf_idy = av_mallocz_array(nb_channels, sizeof(*showwaves->buf_idy)))) {