diff options
author | Paul B Mahol <onemda@gmail.com> | 2019-05-28 11:10:51 +0200 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2019-05-28 11:10:51 +0200 |
commit | 819ed1df94dff335c2653a83e1d3001aa5797f9e (patch) | |
tree | ca6806024b491676c739e615d600904e94422c71 | |
parent | 62c8707e2ac1a7177455366f310d9af74daeff10 (diff) | |
download | ffmpeg-streaming-819ed1df94dff335c2653a83e1d3001aa5797f9e.zip ffmpeg-streaming-819ed1df94dff335c2653a83e1d3001aa5797f9e.tar.gz |
avfilter/avf_aphasemeter: make use of av_rescale
-rw-r--r-- | libavfilter/avf_aphasemeter.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavfilter/avf_aphasemeter.c b/libavfilter/avf_aphasemeter.c index ed83705..f497bc9 100644 --- a/libavfilter/avf_aphasemeter.c +++ b/libavfilter/avf_aphasemeter.c @@ -106,7 +106,7 @@ static int config_input(AVFilterLink *inlink) int nb_samples; if (s->do_video) { - nb_samples = FFMAX(1024, ((double)inlink->sample_rate / av_q2d(s->frame_rate)) + 0.5); + nb_samples = FFMAX(1, av_rescale(inlink->sample_rate, s->frame_rate.den, s->frame_rate.num)); inlink->partial_buf_size = inlink->min_samples = inlink->max_samples = nb_samples; |