Commit 30d90a49 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

wl_shell_surface: fix dead lock when destroying thread

parent aed1b6da
......@@ -131,7 +131,7 @@ endif
### Wayland ###
libwl_shell_surface_plugin_la_SOURCES = wl/shell_surface.c
libwl_shell_surface_plugin_la_CFLAGS = $(WAYLAND_CLIENT_CFLAGS)
libwl_shell_surface_plugin_la_LIBADD = $(WAYLAND_CLIENT_LIBS)
libwl_shell_surface_plugin_la_LIBADD = $(WAYLAND_CLIENT_LIBS) $(LIBPTHREAD)
if HAVE_WAYLAND
vout_LTLIBRARIES += libwl_shell_surface_plugin.la
endif
......
......@@ -46,6 +46,13 @@ struct vout_window_sys_t
vlc_thread_t thread;
};
static void cleanup_wl_display_read(void *data)
{
struct wl_display *display = data;
wl_display_cancel_read(display);
}
/** Background thread for Wayland shell events handling */
static void *Thread(void *data)
{
......@@ -54,6 +61,7 @@ static void *Thread(void *data)
struct pollfd ufd[1];
int canc = vlc_savecancel();
vlc_cleanup_push(cleanup_wl_display_read, display);
ufd[0].fd = wl_display_get_fd(display);
ufd[0].events = POLLIN;
......@@ -73,6 +81,7 @@ static void *Thread(void *data)
wl_display_dispatch_pending(display);
}
assert(0);
vlc_cleanup_pop();
//vlc_restorecancel(canc);
//return NULL;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment