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.
{
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