window: make gst_vaapi_window_reconfigure() thread-safe.

Ensure the X11 implementation for GstVaapiWindow::get_geometry() is
thread-safe by default, so that upper layer users don't need to handle
that explicitly.
This commit is contained in:
Gwenole Beauchesne 2014-07-25 17:29:40 +02:00
parent 08dc3036f4
commit b8040b35c1

View file

@ -295,8 +295,12 @@ gst_vaapi_window_x11_get_geometry (GstVaapiWindow * window,
{
Display *const dpy = GST_VAAPI_OBJECT_XDISPLAY (window);
const Window xid = GST_VAAPI_OBJECT_ID (window);
gboolean success;
return x11_get_geometry (dpy, xid, px, py, pwidth, pheight, NULL);
GST_VAAPI_OBJECT_LOCK_DISPLAY (window);
success = x11_get_geometry (dpy, xid, px, py, pwidth, pheight, NULL);
GST_VAAPI_OBJECT_UNLOCK_DISPLAY (window);
return success;
}
static gboolean