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:
Matthew Waters 2015-12-07 16:39:53 +11:00
parent a4e82bcef7
commit 8819319ad1

View file

@ -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))