From 486516f723d3159c82c75b15a2eefed366542b77 Mon Sep 17 00:00:00 2001 From: Dudemanguy Date: Sun, 16 Aug 2020 16:29:00 -0500 Subject: wayland: don't rely on presentation discarded When using presentation time, we have to be sure to update the ust when no presentation events are received to make sure playback is still smooth and in sync. Part of the recent presentation time refactor was to use the presentation discarded event to signal that the window is hidden. Evidently, this doesn't work the same everywhere for whatever reason (drivers?? hardware??) and at least one user experienced issues with playback getting out of sync since (presumably) the discarded event didn't occur when hiding the window. Instead, let's just go back to the old way of checking if the last_ust is equal to the ust value of the last member in the wayland sync queue. Fixes #8010. --- video/out/opengl/context_wayland.c | 3 --- 1 file changed, 3 deletions(-) (limited to 'video/out/opengl/context_wayland.c') diff --git a/video/out/opengl/context_wayland.c b/video/out/opengl/context_wayland.c index 11df19da8c..59e24ded43 100644 --- a/video/out/opengl/context_wayland.c +++ b/video/out/opengl/context_wayland.c @@ -77,13 +77,10 @@ static void feedback_presented(void *data, struct wp_presentation_feedback *fbac wl->sync[index].ust = sec * 1000000LL + (uint64_t) tv_nsec / 1000; wl->sync[index].msc = (uint64_t) seq_lo + ((uint64_t) seq_hi << 32); wl->sync[index].filled = true; - wl->presentation_discarded = false; } static void feedback_discarded(void *data, struct wp_presentation_feedback *fback) { - struct vo_wayland_state *wl = data; - wl->presentation_discarded = true; } static const struct wp_presentation_feedback_listener feedback_listener = { -- cgit v1.2.3