[mutter/gnome-3-36] screen-cast-stream-src: Don't throttle if max framerate is 1/0
- From: Jonas Ådahl <jadahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/gnome-3-36] screen-cast-stream-src: Don't throttle if max framerate is 1/0
- Date: Fri, 22 May 2020 22:04:50 +0000 (UTC)
commit ba1f4221e90b80da57dcfa24548f97e5a75b57c1
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
(cherry picked from commit 96dd794fd18ac2650d6186de5c62da7051f0ce92)
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 4f3d821ef..ad0d9ed79 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]