diff options
author | Dudemanguy <random342@airmail.cc> | 2021-11-24 22:43:43 -0600 |
---|---|---|
committer | Dudemanguy <random342@airmail.cc> | 2021-11-24 23:28:53 -0600 |
commit | 55b085707adcd3701ed5f8b6b9953ed90ecdb59a (patch) | |
tree | 809bd408847138d013fcde2971595f88254d402f | |
parent | 79bfcc672343ddbc348e040ad899d61a0bafc050 (diff) | |
download | mpv-55b085707adcd3701ed5f8b6b9953ed90ecdb59a.tar.bz2 mpv-55b085707adcd3701ed5f8b6b9953ed90ecdb59a.tar.xz |
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.
-rw-r--r-- | video/out/wayland_common.c | 3 |
1 files changed, 3 insertions, 0 deletions
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; |