mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-10 03:19:40 +00:00
wayland: don't poll if there are no pending frames
Otherwise the following poll may not return for an arbitrary amount of time. This can happen if another wayland event queue has flushed and read our events. https://bugzilla.gnome.org/show_bug.cgi?id=795224
This commit is contained in:
parent
e19570a8b6
commit
1f71b5a57d
1 changed files with 5 additions and 0 deletions
|
@ -185,6 +185,11 @@ gst_vaapi_window_wayland_sync (GstVaapiWindow * window)
|
|||
if (wl_display_flush (wl_display) < 0)
|
||||
goto error;
|
||||
|
||||
if (g_atomic_int_get (&priv->num_frames_pending) == 0) {
|
||||
wl_display_cancel_read (wl_display);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
again:
|
||||
if (gst_poll_wait (priv->poll, GST_CLOCK_TIME_NONE) < 0) {
|
||||
int saved_errno = errno;
|
||||
|
|
Loading…
Reference in a new issue