vulkanimage: move fence creation earlier

Fixes a critical:

GStreamer-CRITICAL **: 02:26:34.698: gst_mini_object_ref: assertion 'mini_object != NULL' failed
This commit is contained in:
Matthew Waters 2019-10-28 02:27:04 +11:00 committed by Sebastian Dröge
parent 103112725c
commit ecca6cbfd2

View file

@ -545,6 +545,10 @@ gst_vulkan_image_identity_transform (GstBaseTransform * bt, GstBuffer * inbuf,
GError *error = NULL; GError *error = NULL;
VkResult err; VkResult err;
fence = gst_vulkan_fence_new (render->device, 0, &error);
if (!fence)
goto error;
in_mem = gst_buffer_peek_memory (inbuf, 0); in_mem = gst_buffer_peek_memory (inbuf, 0);
if (!gst_is_vulkan_image_memory (in_mem)) { if (!gst_is_vulkan_image_memory (in_mem)) {
g_set_error_literal (&error, GST_VULKAN_ERROR, GST_VULKAN_FAILED, g_set_error_literal (&error, GST_VULKAN_ERROR, GST_VULKAN_FAILED,
@ -586,9 +590,6 @@ gst_vulkan_image_identity_transform (GstBaseTransform * bt, GstBuffer * inbuf,
goto error; goto error;
} }
fence = gst_vulkan_fence_new (render->device, 0, &error);
if (!fence)
goto error;
{ {
VkCommandBufferBeginInfo cmd_buf_info = { 0, }; VkCommandBufferBeginInfo cmd_buf_info = { 0, };