summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorMatthew Waters <matthew@centricular.com>2018-02-08 16:55:43 +1100
committerMatthew Waters <matthew@centricular.com>2018-02-08 16:55:43 +1100
commite5c4135e810be730e8b378a537d48652e9bbcdef (patch)
tree5cf4c6bbe6dd60e290b74fd5877e585328b44133 /ext
parent6f50d35246d0217df950fd4efadae540ab2592ae (diff)
downloadgstreamer-plugins-bad-e5c4135e810be730e8b378a537d48652e9bbcdef.tar.gz
vulkanupload: actually loop over possible uploaders
Fix some funky control that wasn't working CID #1417219
Diffstat (limited to 'ext')
-rw-r--r--ext/vulkan/vkupload.c35
1 files changed, 18 insertions, 17 deletions
diff --git a/ext/vulkan/vkupload.c b/ext/vulkan/vkupload.c
index 07bf6e531..ffe963ef9 100644
--- a/ext/vulkan/vkupload.c
+++ b/ext/vulkan/vkupload.c
@@ -794,7 +794,8 @@ gst_vulkan_upload_prepare_output_buffer (GstBaseTransform * bt,
GstVulkanUpload *vk_upload = GST_VULKAN_UPLOAD (bt);
GstFlowReturn ret;
- do {
+restart:
+ {
gpointer method_impl;
const struct UploadMethod *method;
@@ -803,24 +804,24 @@ gst_vulkan_upload_prepare_output_buffer (GstBaseTransform * bt,
ret = method->perform (method_impl, inbuf, outbuf);
if (ret != GST_FLOW_OK) {
- do {
- if (!_upload_find_method (vk_upload)) {
- GST_ELEMENT_ERROR (bt, RESOURCE, NOT_FOUND,
- ("Could not find suitable uploader"), (NULL));
- return GST_FLOW_ERROR;
- }
-
- method = upload_methods[vk_upload->current_impl];
- method_impl = vk_upload->upload_impls[vk_upload->current_impl];
- if (!method->set_caps (method_impl, vk_upload->in_caps,
- vk_upload->out_caps))
- /* try the next method */
- continue;
- } while (FALSE);
+ next_method:
+ if (!_upload_find_method (vk_upload)) {
+ GST_ELEMENT_ERROR (bt, RESOURCE, NOT_FOUND,
+ ("Could not find suitable uploader"), (NULL));
+ return GST_FLOW_ERROR;
+ }
+
+ method = upload_methods[vk_upload->current_impl];
+ method_impl = vk_upload->upload_impls[vk_upload->current_impl];
+ if (!method->set_caps (method_impl, vk_upload->in_caps,
+ vk_upload->out_caps))
+ /* try the next method */
+ goto next_method;
+
/* try the uploading with the next method */
- continue;
+ goto restart;
}
- } while (FALSE);
+ }
if (ret == GST_FLOW_OK) {
/* basetransform doesn't unref if they're the same */