vulkanupload: actually loop over possible uploaders

Fix some funky control that wasn't working

CID #1417219
This commit is contained in:
Matthew Waters 2018-02-08 16:55:43 +11:00
parent 6f50d35246
commit e5c4135e81

View file

@ -794,7 +794,8 @@ gst_vulkan_upload_prepare_output_buffer (GstBaseTransform * bt,
GstVulkanUpload *vk_upload = GST_VULKAN_UPLOAD (bt); GstVulkanUpload *vk_upload = GST_VULKAN_UPLOAD (bt);
GstFlowReturn ret; GstFlowReturn ret;
do { restart:
{
gpointer method_impl; gpointer method_impl;
const struct UploadMethod *method; const struct UploadMethod *method;
@ -803,7 +804,7 @@ gst_vulkan_upload_prepare_output_buffer (GstBaseTransform * bt,
ret = method->perform (method_impl, inbuf, outbuf); ret = method->perform (method_impl, inbuf, outbuf);
if (ret != GST_FLOW_OK) { if (ret != GST_FLOW_OK) {
do { next_method:
if (!_upload_find_method (vk_upload)) { if (!_upload_find_method (vk_upload)) {
GST_ELEMENT_ERROR (bt, RESOURCE, NOT_FOUND, GST_ELEMENT_ERROR (bt, RESOURCE, NOT_FOUND,
("Could not find suitable uploader"), (NULL)); ("Could not find suitable uploader"), (NULL));
@ -815,12 +816,12 @@ gst_vulkan_upload_prepare_output_buffer (GstBaseTransform * bt,
if (!method->set_caps (method_impl, vk_upload->in_caps, if (!method->set_caps (method_impl, vk_upload->in_caps,
vk_upload->out_caps)) vk_upload->out_caps))
/* try the next method */ /* try the next method */
continue; goto next_method;
} while (FALSE);
/* try the uploading with the next method */ /* try the uploading with the next method */
continue; goto restart;
}
} }
} while (FALSE);
if (ret == GST_FLOW_OK) { if (ret == GST_FLOW_OK) {
/* basetransform doesn't unref if they're the same */ /* basetransform doesn't unref if they're the same */