summaryrefslogtreecommitdiff
path: root/libavfilter
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2021-08-04 22:11:41 +0200
committerPaul B Mahol <onemda@gmail.com>2021-08-04 22:11:41 +0200
commitb1388cd6c53a101425f33f427ac890d42d03e107 (patch)
tree27f0527cf6c5a99f4c88c483d44dec19bf315ea2 /libavfilter
parent20ebcbd52055a918d07ba1719ff76330f697cd8e (diff)
avfilter/avf_showspectrum: proper rational multiplication
Diffstat (limited to 'libavfilter')
-rw-r--r--libavfilter/avf_showspectrum.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavfilter/avf_showspectrum.c b/libavfilter/avf_showspectrum.c
index 14fc318166..b9391a6efb 100644
--- a/libavfilter/avf_showspectrum.c
+++ b/libavfilter/avf_showspectrum.c
@@ -1189,9 +1189,9 @@ static int config_output(AVFilterLink *outlink)
s->auto_frame_rate = av_make_q(inlink->sample_rate, s->hop_size);
if (s->orientation == VERTICAL && s->sliding == FULLFRAME)
- s->auto_frame_rate.den *= s->w;
+ s->auto_frame_rate = av_mul_q(s->auto_frame_rate, av_make_q(1, s->w));
if (s->orientation == HORIZONTAL && s->sliding == FULLFRAME)
- s->auto_frame_rate.den *= s->h;
+ s->auto_frame_rate = av_mul_q(s->auto_frame_rate, av_make_q(1, s->h));
if (!s->single_pic && strcmp(s->rate_str, "auto")) {
int ret = av_parse_video_rate(&s->frame_rate, s->rate_str);
if (ret < 0)