mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-28 11:55:39 +00:00
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:
parent
08dc3036f4
commit
b8040b35c1
1 changed files with 5 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue