[mutter] screen-cast-stream-src: Don't throttle if max framerate is 1/0
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] screen-cast-stream-src: Don't throttle if max framerate is 1/0
- Date: Fri, 22 May 2020 00:29:51 +0000 (UTC)
commit 96dd794fd18ac2650d6186de5c62da7051f0ce92
Author: Jonas Ã…dahl <jadahl gmail com>
Date: Tue May 12 08:52:01 2020 +0200
screen-cast-stream-src: Don't throttle if max framerate is 1/0
The max framerate 1/0 means variable without any particular max, so
don't throttle if that was set.
Not doing this would end up with a floating point exception.
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1251
src/backends/meta-screen-cast-stream-src.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/src/backends/meta-screen-cast-stream-src.c b/src/backends/meta-screen-cast-stream-src.c
index e63f5ddbb..544ed27a3 100644
--- a/src/backends/meta-screen-cast-stream-src.c
+++ b/src/backends/meta-screen-cast-stream-src.c
@@ -445,7 +445,8 @@ meta_screen_cast_stream_src_maybe_record_frame (MetaScreenCastStreamSrc *src)
uint64_t now_us;
now_us = g_get_monotonic_time ();
- if (priv->last_frame_timestamp_us != 0 &&
+ if (priv->video_format.max_framerate.num > 0 &&
+ priv->last_frame_timestamp_us != 0 &&
(now_us - priv->last_frame_timestamp_us <
((1000000 * priv->video_format.max_framerate.denom) /
priv->video_format.max_framerate.num)))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]