mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +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) {
|
if (mixpad->fps_n == 0) {
|
||||||
duration = GST_CLOCK_TIME_NONE;
|
duration = GST_CLOCK_TIME_NONE;
|
||||||
} else {
|
} 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))
|
if (GST_CLOCK_TIME_IS_VALID (duration))
|
||||||
|
@ -1269,7 +1271,7 @@ gst_videomixer_update_queues (GstVideoMixer * mix)
|
||||||
if (mix->fps_n == 0) {
|
if (mix->fps_n == 0) {
|
||||||
interval = G_MAXINT64;
|
interval = G_MAXINT64;
|
||||||
} else {
|
} 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",
|
GST_LOG_OBJECT (mix, "set interval to %" G_GUINT64_FORMAT " nanoseconds",
|
||||||
interval);
|
interval);
|
||||||
|
|
Loading…
Reference in a new issue