mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-19 00:01:23 +00:00
videomixer: Use gst_util_uint64_scale_int() for fps to seconds per frame calculations
This commit is contained in:
parent
3ddb75e3c5
commit
b0f8978fd8
1 changed files with 4 additions and 2 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue