ffmpeg | branch: master | Paul B Mahol <one...@gmail.com> | Tue May 28 10:46:38 
2019 +0200| [618f8bb0a49eba78e6b1af65f8129363464c1968] | committer: Paul B Mahol

avfilter/avf_abitscope: make use of av_rescale

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=618f8bb0a49eba78e6b1af65f8129363464c1968
---

 libavfilter/avf_abitscope.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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;
 

_______________________________________________
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