From 55b085707adcd3701ed5f8b6b9953ed90ecdb59a Mon Sep 17 00:00:00 2001 From: Dudemanguy Date: Wed, 24 Nov 2021 22:43:43 -0600 Subject: wayland: initialize presentation time values as 0 Better to avoid any wonky calculations on startup with garbage values. The others end up being derived from last_ust/last_msc. refresh_interval is referenced exactly once and could, in theory, result in some terribly erroneous vblank time. --- video/out/wayland_common.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/video/out/wayland_common.c b/video/out/wayland_common.c index cae0c6a5d3..975b3eaba0 100644 --- a/video/out/wayland_common.c +++ b/video/out/wayland_common.c @@ -1726,6 +1726,9 @@ int vo_wayland_init(struct vo *vo) } if (wl->presentation) { + wl->last_ust = 0; + wl->last_msc = 0; + wl->refresh_interval = 0; wl->sync = talloc_zero_array(wl, struct vo_wayland_sync, 1); struct vo_wayland_sync sync = {0, 0, 0, 0}; wl->sync[0] = sync; -- cgit v1.2.3