mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-04 23:46:43 +00:00
vkencoder-private: shuffle up get format to bail out better
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7993>
This commit is contained in:
parent
98d30cc30a
commit
83cd24a30d
1 changed files with 7 additions and 8 deletions
|
@ -694,6 +694,13 @@ gst_vulkan_encoder_start (GstVulkanEncoder * self,
|
|||
}
|
||||
GST_OBJECT_UNLOCK (self);
|
||||
|
||||
/* Get output format */
|
||||
pic_format = gst_vulkan_video_encoder_get_format (self,
|
||||
VK_IMAGE_USAGE_VIDEO_ENCODE_SRC_BIT_KHR |
|
||||
VK_IMAGE_USAGE_VIDEO_ENCODE_DPB_BIT_KHR, error);
|
||||
if (pic_format == VK_FORMAT_UNDEFINED)
|
||||
return FALSE;
|
||||
|
||||
priv->profile_caps = gst_vulkan_video_profile_to_caps (&priv->profile);
|
||||
|
||||
GST_LOG_OBJECT (self, "Capabilities for %" GST_PTR_FORMAT ":\n"
|
||||
|
@ -717,14 +724,6 @@ gst_vulkan_encoder_start (GstVulkanEncoder * self,
|
|||
|
||||
priv->caps.caps.pNext = NULL;
|
||||
|
||||
/* Get output format */
|
||||
pic_format =
|
||||
gst_vulkan_video_encoder_get_format (self,
|
||||
VK_IMAGE_USAGE_VIDEO_ENCODE_SRC_BIT_KHR |
|
||||
VK_IMAGE_USAGE_VIDEO_ENCODE_DPB_BIT_KHR, error);
|
||||
if (pic_format == VK_FORMAT_UNDEFINED)
|
||||
goto failed;
|
||||
|
||||
/* *INDENT-OFF* */
|
||||
session_create = (VkVideoSessionCreateInfoKHR) {
|
||||
.sType = VK_STRUCTURE_TYPE_VIDEO_SESSION_CREATE_INFO_KHR,
|
||||
|
|
Loading…
Reference in a new issue