From fe63034dd4dc8d098a1ba04cb0fa1fa1449882be Mon Sep 17 00:00:00 2001 From: Seungha Yang Date: Fri, 10 Mar 2023 00:24:46 +0900 Subject: [PATCH] va: Don't error out on plugin registration Keep enumerate devices and don't return FALSE on plugin_init() Part-of: --- subprojects/gst-plugins-bad/sys/va/plugin.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/subprojects/gst-plugins-bad/sys/va/plugin.c b/subprojects/gst-plugins-bad/sys/va/plugin.c index f8b69b2715..ffa00f4619 100644 --- a/subprojects/gst-plugins-bad/sys/va/plugin.c +++ b/subprojects/gst-plugins-bad/sys/va/plugin.c @@ -299,7 +299,7 @@ plugin_register_elements (GstPlugin * plugin, GstVaDevice * device) status = vaQueryConfigProfiles (dpy, profiles, &num_profiles); if (status != VA_STATUS_SUCCESS) { - GST_ERROR ("vaQueryConfigProfile: %s", vaErrorStr (status)); + GST_WARNING ("vaQueryConfigProfile: %s", vaErrorStr (status)); goto bail; } @@ -307,7 +307,7 @@ plugin_register_elements (GstPlugin * plugin, GstVaDevice * device) status = vaQueryConfigEntrypoints (dpy, profiles[i], entrypoints, &num_entrypoints); if (status != VA_STATUS_SUCCESS) { - GST_ERROR ("vaQueryConfigEntrypoints: %s", vaErrorStr (status)); + GST_WARNING ("vaQueryConfigEntrypoints: %s", vaErrorStr (status)); goto bail; } @@ -350,22 +350,18 @@ static gboolean plugin_init (GstPlugin * plugin) { GList *devices, *dev; - gboolean ret = TRUE; GST_DEBUG_CATEGORY_INIT (gstva_debug, "va", 0, "VA general debug"); plugin_add_dependencies (plugin); devices = gst_va_device_find_devices (); - for (dev = devices; dev; dev = g_list_next (dev)) { - if (!plugin_register_elements (plugin, dev->data)) { - ret = FALSE; - break; - } - } + for (dev = devices; dev; dev = g_list_next (dev)) + plugin_register_elements (plugin, dev->data); + gst_va_device_list_free (devices); - return ret; + return TRUE; } GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,