aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2019-05-28 10:46:38 +0200
committerPaul B Mahol <onemda@gmail.com>2019-05-28 10:46:38 +0200
commit618f8bb0a49eba78e6b1af65f8129363464c1968 (patch)
treee6eaf0e6abcc53ae12233ebc9c01047718eea724
parentb16806b09d603bc7f3026cc637a531970afbd9a6 (diff)
downloadffmpeg-618f8bb0a49eba78e6b1af65f8129363464c1968.tar.gz
avfilter/avf_abitscope: make use of av_rescale
-rw-r--r--libavfilter/avf_abitscope.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavfilter/avf_abitscope.c b/libavfilter/avf_abitscope.c
index 221ca566a9..6a38521b6c 100644
--- a/libavfilter/avf_abitscope.c
+++ b/libavfilter/avf_abitscope.c
@@ -96,7 +96,7 @@ static int config_input(AVFilterLink *inlink)
int ch;
char *colors, *saveptr = NULL;
- 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));
s->nb_channels = inlink->channels;
s->depth = inlink->format == AV_SAMPLE_FMT_S16P ? 16 : 32;