vkencoder-private: don't override error on get_format() call
If gst_vulkan_video_encoder_get_format() fails it fills the error structure, so it shouldn't be filled again. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7354>
This commit is contained in:
parent
57eb2c700b
commit
591eb2b527
@ -289,9 +289,9 @@ gst_vulkan_video_encoder_get_format (GstVulkanEncoder * self,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (n_fmts == 0) {
|
if (n_fmts == 0) {
|
||||||
g_free (fmts);
|
|
||||||
g_set_error (error, GST_VULKAN_ERROR, VK_ERROR_INITIALIZATION_FAILED,
|
g_set_error (error, GST_VULKAN_ERROR, VK_ERROR_INITIALIZATION_FAILED,
|
||||||
"Profile doesn't have an output format");
|
"Profile doesn't have an output format");
|
||||||
|
goto beach;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* find the best output format */
|
/* find the best output format */
|
||||||
@ -776,11 +776,8 @@ gst_vulkan_encoder_start (GstVulkanEncoder * self,
|
|||||||
gst_vulkan_video_encoder_get_format (self,
|
gst_vulkan_video_encoder_get_format (self,
|
||||||
VK_IMAGE_USAGE_VIDEO_ENCODE_SRC_BIT_KHR |
|
VK_IMAGE_USAGE_VIDEO_ENCODE_SRC_BIT_KHR |
|
||||||
VK_IMAGE_USAGE_VIDEO_ENCODE_DPB_BIT_KHR, error);
|
VK_IMAGE_USAGE_VIDEO_ENCODE_DPB_BIT_KHR, error);
|
||||||
if (pic_format == VK_FORMAT_UNDEFINED) {
|
if (pic_format == VK_FORMAT_UNDEFINED)
|
||||||
g_set_error (error, GST_VULKAN_ERROR, VK_ERROR_INITIALIZATION_FAILED,
|
|
||||||
"No valid picture format found");
|
|
||||||
goto failed;
|
goto failed;
|
||||||
}
|
|
||||||
|
|
||||||
session_create = (VkVideoSessionCreateInfoKHR) {
|
session_create = (VkVideoSessionCreateInfoKHR) {
|
||||||
/* *INDENT-OFF* */
|
/* *INDENT-OFF* */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user