mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-20 23:36:38 +00:00
d3d12ipcclient: Fix deadlock when copying texture
Fixing deadlock in below case * GC lock is taken by background thread, and the background thread calls gst_d3d12_ipc_client_release_imported_data() which takes ipc lock * ipc lock is already taken in ipc thread and trying to pushing GC data via gst_d3d12_command_queue_set_notify() * gst_d3d12_command_queue_set_notify() is trying to take GC lock but it's already taken by background thread Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6749>
This commit is contained in:
parent
19932cf178
commit
46131f0cb0
1 changed files with 4 additions and 0 deletions
|
@ -511,6 +511,8 @@ gst_d3d12_ipc_client_have_data (GstD3D12IpcClient * self)
|
||||||
fence_val);
|
fence_val);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
lk.unlock ();
|
||||||
|
|
||||||
guint64 copy_fence_val;
|
guint64 copy_fence_val;
|
||||||
gst_d3d12_device_copy_texture_region (priv->device, copy_args.size (),
|
gst_d3d12_device_copy_texture_region (priv->device, copy_args.size (),
|
||||||
copy_args.data (), nullptr, nullptr, 0, D3D12_COMMAND_LIST_TYPE_DIRECT,
|
copy_args.data (), nullptr, nullptr, 0, D3D12_COMMAND_LIST_TYPE_DIRECT,
|
||||||
|
@ -524,6 +526,8 @@ gst_d3d12_ipc_client_have_data (GstD3D12IpcClient * self)
|
||||||
(GDestroyNotify) gst_d3d12_ipc_client_release_imported_data);
|
(GDestroyNotify) gst_d3d12_ipc_client_release_imported_data);
|
||||||
|
|
||||||
gst_d3d12_buffer_after_write (buffer, copy_fence_val);
|
gst_d3d12_buffer_after_write (buffer, copy_fence_val);
|
||||||
|
|
||||||
|
lk.lock ();
|
||||||
} else {
|
} else {
|
||||||
gint stride[GST_VIDEO_MAX_PLANES];
|
gint stride[GST_VIDEO_MAX_PLANES];
|
||||||
gsize offset[GST_VIDEO_MAX_PLANES];
|
gsize offset[GST_VIDEO_MAX_PLANES];
|
||||||
|
|
Loading…
Reference in a new issue