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.
This commit is contained in:
Dudemanguy 2021-11-24 22:43:43 -06:00
parent 79bfcc6723
commit 55b085707a
1 changed files with 3 additions and 0 deletions

View File

@ -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;