mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-16 19:25:18 +00:00
d3d12commandqueue: Fix deadlock on drain()
Don't take lock if the drain() is called from the GC thread Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7013>
This commit is contained in:
parent
a2df44da7d
commit
db47f46ad7
1 changed files with 7 additions and 3 deletions
|
@ -570,9 +570,13 @@ gst_d3d12_command_queue_drain (GstD3D12CommandQueue * queue)
|
|||
}
|
||||
|
||||
{
|
||||
std::lock_guard < std::mutex > lk (priv->lock);
|
||||
gc_list = priv->gc_list;
|
||||
priv->gc_list = { };
|
||||
if (priv->gc_thread != g_thread_self ()) {
|
||||
std::lock_guard < std::mutex > lk (priv->lock);
|
||||
gc_list = priv->gc_list;
|
||||
priv->gc_list = { };
|
||||
} else {
|
||||
priv->gc_list = { };
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue