vkimagebufferpool: fail if image cannot be allocated

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4351>
This commit is contained in:
Víctor Manuel Jáquez Leal 2023-05-08 17:07:12 +02:00 committed by GStreamer Marge Bot
parent d91c17264c
commit 26d00ba0cc

View file

@ -246,6 +246,9 @@ gst_vulkan_image_buffer_pool_set_config (GstBufferPool * pool,
if (!img_mem)
goto mem_create_failed;
if (!img_mem)
goto image_failed;
priv->v_info.offset[i] = priv->v_info.size;
priv->v_info.size += img_mem->requirements.size;
@ -292,6 +295,11 @@ missing_profile:
return FALSE;
}
#endif
image_failed:
{
GST_WARNING_OBJECT (pool, "Failed to allocate image");
return FALSE;
}
}
/* This function handles GstBuffer creation */