summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVíctor Manuel Jáquez Leal <vjaquez@igalia.com>2017-04-21 14:07:44 +0200
committerVíctor Manuel Jáquez Leal <vjaquez@igalia.com>2017-04-24 13:14:05 +0200
commit3b314ba93e61bad3d8decbe45bcb12717b595a55 (patch)
treeb87846c6fc6502ca1ba3562c95a71478278ac6b7
parentca314a25ccf81c9740d147c6b20de4c24b354301 (diff)
libs: window: wayland: don't sync at destroy()
Don't call gst_vaapi_window_wayland_sync() when destroying the wayland window instance, since it might lead to a lock at gst_poll_wait() when more than one instances of vaapisink are rendering in the same pipeline, this is because they share the same window. Since now all the frames are freed we don't need to freed the private last_frame, since its address is invalid now. https://bugzilla.gnome.org/show_bug.cgi?id=780442 Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
-rw-r--r--gst-libs/gst/vaapi/gstvaapiwindow_wayland.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/gst-libs/gst/vaapi/gstvaapiwindow_wayland.c b/gst-libs/gst/vaapi/gstvaapiwindow_wayland.c
index ace2cffb..1cdf6d22 100644
--- a/gst-libs/gst/vaapi/gstvaapiwindow_wayland.c
+++ b/gst-libs/gst/vaapi/gstvaapiwindow_wayland.c
@@ -316,9 +316,6 @@ gst_vaapi_window_wayland_destroy (GstVaapiWindow * 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);
-
/* Make sure that the last wl buffer's callback could be called */
GST_VAAPI_OBJECT_LOCK_DISPLAY (window);
if (priv->surface) {
@@ -328,14 +325,11 @@ gst_vaapi_window_wayland_destroy (GstVaapiWindow * window)
}
GST_VAAPI_OBJECT_UNLOCK_DISPLAY (window);
+ gst_poll_set_flushing (priv->poll, TRUE);
+
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;
- }
-
if (priv->shell_surface) {
wl_shell_surface_destroy (priv->shell_surface);
priv->shell_surface = NULL;