summaryrefslogtreecommitdiff
path: root/libavfilter/avf_avectorscope.c
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2019-05-28 10:43:25 +0200
committerPaul B Mahol <onemda@gmail.com>2019-05-28 10:43:25 +0200
commitb16806b09d603bc7f3026cc637a531970afbd9a6 (patch)
tree6b29746bc9184e51da4e3cbbac8725e056ad167c /libavfilter/avf_avectorscope.c
parenteae251ead9e380c722dce7ac3f4e97017bff9a7b (diff)
downloadffmpeg-b16806b09d603bc7f3026cc637a531970afbd9a6.tar.gz
avfilter/avf_avectorscope: make use of av_rescale
Diffstat (limited to 'libavfilter/avf_avectorscope.c')
-rw-r--r--libavfilter/avf_avectorscope.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavfilter/avf_avectorscope.c b/libavfilter/avf_avectorscope.c
index d9ec151331..0f53b36dfb 100644
--- a/libavfilter/avf_avectorscope.c
+++ b/libavfilter/avf_avectorscope.c
@@ -211,7 +211,7 @@ static int config_input(AVFilterLink *inlink)
AVFilterContext *ctx = inlink->dst;
AudioVectorScopeContext *s = ctx->priv;
- s->nb_samples = FFMAX(1, ((double)inlink->sample_rate / av_q2d(s->frame_rate)) + 0.5);
+ s->nb_samples = FFMAX(1, av_rescale(inlink->sample_rate, s->frame_rate.den, s->frame_rate.num));
return 0;
}