dwrite: Protect ID2D1Factory API with lock

ID2D1Factory::CreateDxgiSurfaceRenderTarget is not thread-safe

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4886>
This commit is contained in:
Seungha Yang 2023-06-19 00:06:56 +09:00 committed by GStreamer Marge Bot
parent 8325623051
commit 93db77ea3a

View file

@ -2154,13 +2154,13 @@ gst_dwrite_base_overlay_render_text (GstDWriteBaseOverlay * self)
goto error;
}
gst_d3d11_device_lock (priv->device);
texture = (ID3D11Texture2D *) info.data;
if (!gst_dwrite_base_overlay_get_d2d_target (self, texture, &target)) {
gst_d3d11_device_unlock (priv->device);
gst_memory_unmap (mem, &info);
goto error;
}
gst_d3d11_device_lock (priv->device);
}
bg_color = unpack_argb (priv->background_color);