vkmemory: unref queue in barriers

Queue might be assigned for queue transfers, so we need to unref it if the
memory has been assigned to a specific queue.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5079>
This commit is contained in:
Víctor Manuel Jáquez Leal 2023-06-28 19:38:33 +02:00 committed by GStreamer Marge Bot
parent 5acd6c23b8
commit 8809ce5648
2 changed files with 4 additions and 0 deletions

View file

@ -271,6 +271,8 @@ _vk_buffer_mem_free (GstAllocator * allocator, GstMemory * memory)
if (mem->buffer && !mem->wrapped)
vkDestroyBuffer (mem->device->device, mem->buffer, NULL);
gst_clear_object (&mem->barrier.parent.queue);
if (mem->vk_mem)
gst_memory_unref ((GstMemory *) mem->vk_mem);

View file

@ -366,6 +366,8 @@ _vk_image_mem_free (GstAllocator * allocator, GstMemory * memory)
if (mem->image && !mem->wrapped)
vkDestroyImage (mem->device->device, mem->image, NULL);
gst_clear_object (&mem->barrier.parent.queue);
if (mem->vk_mem)
gst_memory_unref ((GstMemory *) mem->vk_mem);