mirror of https://github.com/mpv-player/mpv
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:
parent
79bfcc6723
commit
55b085707a
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue