projects
/
ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cd75396
)
avfilter/avf_showwaves: make use of av_rescale_q
author
Paul B Mahol
<onemda@gmail.com>
Tue, 28 May 2019 09:07:47 +0000
(11:07 +0200)
committer
Paul B Mahol
<onemda@gmail.com>
Tue, 28 May 2019 09:07:47 +0000
(11:07 +0200)
libavfilter/avf_showwaves.c
patch
|
blob
|
history
diff --git
a/libavfilter/avf_showwaves.c
b/libavfilter/avf_showwaves.c
index
a0d2b25
..
d85ebd9
100644
(file)
--- 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)))) {