vulkan: sink references at instantiation

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6527>
This commit is contained in:
Víctor Manuel Jáquez Leal 2023-12-05 12:24:01 +01:00 committed by GStreamer Marge Bot
parent 4836312360
commit 4a51579cb2
2 changed files with 13 additions and 2 deletions

View file

@ -1437,8 +1437,14 @@ gst_vulkan_operation_pipeline_barrier2 (GstVulkanOperation * self,
GstVulkanOperation *
gst_vulkan_operation_new (GstVulkanCommandPool * cmd_pool)
{
GstVulkanOperation *self;
g_return_val_if_fail (GST_IS_VULKAN_COMMAND_POOL (cmd_pool), NULL);
return g_object_new (GST_TYPE_VULKAN_OPERATION, "command-pool", cmd_pool,
self = g_object_new (GST_TYPE_VULKAN_OPERATION, "command-pool", cmd_pool,
NULL);
gst_object_ref_sink (self);
return self;
}

View file

@ -532,7 +532,12 @@ gst_vulkan_trash_fence_list_init (GstVulkanTrashFenceList * trash_list)
GstVulkanTrashList *
gst_vulkan_trash_fence_list_new (void)
{
return g_object_new (gst_vulkan_trash_fence_list_get_type (), NULL);
GstVulkanTrashList *ret;
ret = g_object_new (gst_vulkan_trash_fence_list_get_type (), NULL);
gst_object_ref_sink (ret);
return ret;
}
GST_DEFINE_MINI_OBJECT_TYPE (GstVulkanTrash, gst_vulkan_trash);