mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 01:00:37 +00:00
vkswapper: always match lock/unlock of the render lock
If a draw event comes from the winsys before we've rendered a buffer we were deadlocking.
This commit is contained in:
parent
a4e82bcef7
commit
8819319ad1
1 changed files with 3 additions and 1 deletions
|
@ -1058,8 +1058,10 @@ _on_window_draw (GstVulkanWindow * window, GstVulkanSwapper * swapper)
|
|||
GError *error = NULL;
|
||||
|
||||
RENDER_LOCK (swapper);
|
||||
if (!swapper->current_buffer)
|
||||
if (!swapper->current_buffer) {
|
||||
RENDER_UNLOCK (swapper);
|
||||
return;
|
||||
}
|
||||
|
||||
/* TODO: perform some rate limiting of the number of redraw events */
|
||||
if (!_render_buffer_unlocked (swapper, swapper->current_buffer, &error))
|
||||
|
|
Loading…
Reference in a new issue