[FFmpeg-cvslog] avfilter/avf_avectorscope: make use of av_rescale
Paul B Mahol
git at videolan.org
Tue May 28 12:16:54 EEST 2019
ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Tue May 28 10:43:25 2019 +0200| [b16806b09d603bc7f3026cc637a531970afbd9a6] | committer: Paul B Mahol
avfilter/avf_avectorscope: make use of av_rescale
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b16806b09d603bc7f3026cc637a531970afbd9a6
---
libavfilter/avf_avectorscope.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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;
}
More information about the ffmpeg-cvslog
mailing list