From 0c6ac287e6da91ba76bf3958befef4bec6ed28f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Wed, 8 Jul 2020 15:08:23 +0200 Subject: [PATCH] screen-cast/src: Use G_USEC_PER_SEC instead of 1000000 https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1351 --- src/backends/meta-screen-cast-stream-src.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/backends/meta-screen-cast-stream-src.c b/src/backends/meta-screen-cast-stream-src.c index 8412642b9..070c67a93 100644 --- a/src/backends/meta-screen-cast-stream-src.c +++ b/src/backends/meta-screen-cast-stream-src.c @@ -515,8 +515,9 @@ meta_screen_cast_stream_src_maybe_record_frame (MetaScreenCastStreamSrc *src, int64_t min_interval_us; int64_t time_since_last_frame_us; - min_interval_us = ((1000000 * priv->video_format.max_framerate.denom) / - priv->video_format.max_framerate.num); + min_interval_us = + ((G_USEC_PER_SEC * priv->video_format.max_framerate.denom) / + priv->video_format.max_framerate.num); time_since_last_frame_us = now_us - priv->last_frame_timestamp_us; if (time_since_last_frame_us < min_interval_us)