From 896a836f1dcd52c08d6ebcd5045d47036dce5854 Mon Sep 17 00:00:00 2001 From: Jagyum Koo Date: Sun, 30 Oct 2016 10:43:49 +0900 Subject: [PATCH] libs: window: wayland: rt event queue at destroy() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The proxy object of wl_buffer for the last frame remains in the wl_map. Even though we call wl_buffer_destroy() in frame_release_callback(), the proxy object remains without being removed, since proxy object is deleted when wayland server sees the delete request and sends 'delete_id' event. We need to call roundtrip before destroying event_queue so that the proxy object is removed. Otherwise, it would be mess up as receiving 'delete_id' event from previous play, when playing in the next va/wayland window with the same wl_display connection. https://bugzilla.gnome.org/show_bug.cgi?id=773689 Signed-off-by: Víctor Manuel Jáquez Leal --- gst-libs/gst/vaapi/gstvaapiwindow_wayland.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gst-libs/gst/vaapi/gstvaapiwindow_wayland.c b/gst-libs/gst/vaapi/gstvaapiwindow_wayland.c index dda423baf4..e4797b7c21 100644 --- a/gst-libs/gst/vaapi/gstvaapiwindow_wayland.c +++ b/gst-libs/gst/vaapi/gstvaapiwindow_wayland.c @@ -313,10 +313,15 @@ gst_vaapi_window_wayland_destroy (GstVaapiWindow * window) { GstVaapiWindowWaylandPrivate *const priv = GST_VAAPI_WINDOW_WAYLAND_GET_PRIVATE (window); + struct wl_display *const wl_display = + GST_VAAPI_OBJECT_NATIVE_DISPLAY (window); /* Wait for the last frame to complete redraw */ gst_vaapi_window_wayland_sync (window); + if (priv->event_queue) + wl_display_roundtrip_queue (wl_display, priv->event_queue); + if (priv->last_frame) { frame_state_free (priv->last_frame); priv->last_frame = NULL;