ffmpeg | branch: master | Paul B Mahol <one...@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;
 }

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to