From 55f6ba62bedfe177701d46ef09afde69ca5ab0eb Mon Sep 17 00:00:00 2001 From: Dudemanguy Date: Mon, 18 May 2020 10:54:18 -0500 Subject: wayland: only use presentation on CLOCK_MONOTONIC Trying to use anything other than CLOCK_MONOTONIC here would be a disaster. No idea if it's even possible for the clockid here to be something other than CLOCK_MONOTONIC in this function but it's better safe than sorry. Closes #7740. --- video/out/wayland_common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'video/out') diff --git a/video/out/wayland_common.c b/video/out/wayland_common.c index f5adc7a15a..3995db3270 100644 --- a/video/out/wayland_common.c +++ b/video/out/wayland_common.c @@ -829,8 +829,8 @@ static void pres_set_clockid(void *data, struct wp_presentation *pres, { struct vo_wayland_state *wl = data; - wl->presentation = pres; - clockid = CLOCK_MONOTONIC; + if (clockid == CLOCK_MONOTONIC) + wl->presentation = pres; } static const struct wp_presentation_listener pres_listener = { -- cgit v1.2.3