From b0f8978fd8f0d68dcbfab794613472f64cc2aa57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Wed, 9 Dec 2009 16:15:09 +0100 Subject: [PATCH] videomixer: Use gst_util_uint64_scale_int() for fps to seconds per frame calculations --- gst/videomixer/videomixer.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gst/videomixer/videomixer.c b/gst/videomixer/videomixer.c index a598c4ff1a..9107feed8e 100644 --- a/gst/videomixer/videomixer.c +++ b/gst/videomixer/videomixer.c @@ -1149,7 +1149,9 @@ gst_videomixer_fill_queues (GstVideoMixer * mix) if (mixpad->fps_n == 0) { duration = GST_CLOCK_TIME_NONE; } else { - duration = GST_SECOND * mixpad->fps_d / mixpad->fps_n; + duration = + gst_util_uint64_scale_int (GST_SECOND, mixpad->fps_d, + mixpad->fps_n); } } if (GST_CLOCK_TIME_IS_VALID (duration)) @@ -1269,7 +1271,7 @@ gst_videomixer_update_queues (GstVideoMixer * mix) if (mix->fps_n == 0) { interval = G_MAXINT64; } else { - interval = GST_SECOND * mix->fps_d / mix->fps_n; + interval = gst_util_uint64_scale_int (GST_SECOND, mix->fps_d, mix->fps_n); } GST_LOG_OBJECT (mix, "set interval to %" G_GUINT64_FORMAT " nanoseconds", interval);