projects
/
platform
/
upstream
/
gst-plugins-bad.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
16d4877
)
vkutils: set the last element of the layer array to NULL
author
Matthew Waters
<matthew@centricular.com>
Thu, 1 Sep 2016 09:43:59 +0000
(19:43 +1000)
committer
Matthew Waters
<matthew@centricular.com>
Thu, 8 Sep 2016 06:14:31 +0000
(16:14 +1000)
g_strv* functions require this to not read off the end of the array.
ext/vulkan/vkutils.c
patch
|
blob
|
history
diff --git
a/ext/vulkan/vkutils.c
b/ext/vulkan/vkutils.c
index 4b547550a4682fadab9dd92c3614e089f8a15892..1c25cb8122c982a853f2eb7da04007dd8274dc98 100644
(file)
--- a/
ext/vulkan/vkutils.c
+++ b/
ext/vulkan/vkutils.c
@@
-36,6
+36,7
@@
_check_for_all_layers (uint32_t check_count, const char **check_names,
if (check_count <= 0 || layer_count <= 0) {
GST_WARNING ("no layers requested or supported");
+ *supported_layers = NULL;
return FALSE;
}
@@
-55,6
+56,7
@@
_check_for_all_layers (uint32_t check_count, const char **check_names,
GST_WARNING ("Cannot find layer: %s", check_names[i]);
}
+ (*supported_layers)[k] = NULL;
*supported_layers_count = g_strv_length (*supported_layers);
return TRUE;