Commit 69943d51 authored by gb's avatar gb

Fix gst_vaapi_window_x11_destroy().

parent fae3777c
......@@ -97,14 +97,18 @@ gst_vaapi_window_x11_destroy(GstVaapiWindow *window)
GstVaapiWindowX11Private * const priv = GST_VAAPI_WINDOW_X11(window)->priv;
Display * const dpy = GST_VAAPI_DISPLAY_XDISPLAY(priv->display);
if (priv->create_window && priv->xid) {
gst_vaapi_window_x11_hide(window);
XDestroyWindow(dpy, priv->xid);
if (priv->xid) {
if (priv->create_window) {
gst_vaapi_window_x11_hide(window);
XDestroyWindow(dpy, priv->xid);
}
priv->xid = None;
}
g_object_unref(priv->display);
priv->display = NULL;
if (priv->display) {
g_object_unref(priv->display);
priv->display = NULL;
}
}
static gboolean
......
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