diff options
author | Paul B Mahol <onemda@gmail.com> | 2019-05-28 10:46:38 +0200 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2019-05-28 10:46:38 +0200 |
commit | 618f8bb0a49eba78e6b1af65f8129363464c1968 (patch) | |
tree | e6eaf0e6abcc53ae12233ebc9c01047718eea724 | |
parent | b16806b09d603bc7f3026cc637a531970afbd9a6 (diff) | |
download | ffmpeg-618f8bb0a49eba78e6b1af65f8129363464c1968.tar.gz |
avfilter/avf_abitscope: make use of av_rescale
-rw-r--r-- | libavfilter/avf_abitscope.c | 2 |
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; |