if (!(vk_sink->device =
gst_vulkan_instance_create_device (vk_sink->instance, &error))) {
GST_ELEMENT_ERROR (vk_sink, RESOURCE, NOT_FOUND,
- ("Failed to create vulkan device"), ("%s", error->message));
+ ("Failed to create vulkan device"), ("%s",
+ error ? error->message : ""));
g_clear_error (&error);
return GST_STATE_CHANGE_FAILURE;
}
if (!gst_vulkan_window_open (vk_sink->window, &error)) {
GST_ELEMENT_ERROR (vk_sink, RESOURCE, NOT_FOUND,
- ("Failed to open window"), ("%s", error->message));
+ ("Failed to open window"), ("%s", error ? error->message : ""));
g_clear_error (&error);
return GST_STATE_CHANGE_FAILURE;
}
gst_vulkan_queue_run_context_query (GST_ELEMENT (vk_sink), &queue);
if (!gst_vulkan_swapper_choose_queue (vk_sink->swapper, queue, &error)) {
GST_ELEMENT_ERROR (vk_sink, RESOURCE, NOT_FOUND,
- ("Swapper failed to choose a compatible Vulkan Queue"), ("%s",
- error->message));
+ ("Swapper failed to choose a compatible Vulkan Queue"),
+ ("%s", error ? error->message : ""));
return GST_STATE_CHANGE_FAILURE;
}
}
if (vk_sink->swapper) {
if (!(result =
gst_vulkan_swapper_get_supported_caps (vk_sink->swapper, &error))) {
- GST_ELEMENT_ERROR (bsink, RESOURCE, NOT_FOUND, ("%s", error->message),
- (NULL));
+ GST_ELEMENT_ERROR (bsink, RESOURCE, NOT_FOUND, ("%s",
+ error ? error->message : ""), (NULL));
g_clear_error (&error);
return NULL;
}
if (!gst_vulkan_swapper_set_caps (vk_sink->swapper, caps, &error)) {
GST_ELEMENT_ERROR (vk_sink, RESOURCE, NOT_FOUND,
- ("Failed to configure caps"), ("%s", error->message));
+ ("Failed to configure caps"), ("%s", error ? error->message : ""));
g_clear_error (&error);
return FALSE;
}
if (!gst_vulkan_swapper_render_buffer (vk_sink->swapper, buf, &error)) {
GST_ELEMENT_ERROR (vk_sink, RESOURCE, NOT_FOUND,
- ("Failed to render buffer"), ("%s", error->message));
+ ("Failed to render buffer"), ("%s", error ? error->message : ""));
g_clear_error (&error);
return GST_FLOW_ERROR;
}