From 1c8f069e4247a9e2f7cc50e9111f41be1d6ebcbb Mon Sep 17 00:00:00 2001 From: Julien Isorce Date: Sat, 20 May 2017 14:49:20 +0100 Subject: [PATCH] omx: allow 0 feature Previously the omx plugin was blacklisted if GST_OMX_CONFIG_DIR points to an invalid path or if the gstomx.conf contains 0 valid component. Problem is that once the plugin is blacklisted, a rescan is not triggered upon changes of the env var or the gstomx.conf file despite being setup with gst_plugin_add_dependency. This also makes it more consistent with other plugins that auto generate features. For example gst-{ffmeg,libav}, gstreamer-vaapi, v4l2 video dec. To clarify the diff, the plugin_init func will return TRUE even if g_key_file_get_groups returns 0 element and even if g_key_file_load_from_dirs fails. https://bugzilla.gnome.org/show_bug.cgi?id=782867 --- omx/gstomx.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/omx/gstomx.c b/omx/gstomx.c index 214f6188cf..90bc059b1a 100644 --- a/omx/gstomx.c +++ b/omx/gstomx.c @@ -2659,7 +2659,6 @@ _class_init (gpointer g_class, gpointer data) static gboolean plugin_init (GstPlugin * plugin) { - gboolean ret = FALSE; GError *err = NULL; gchar **config_dirs; gchar **elements; @@ -2807,7 +2806,7 @@ plugin_init (GstPlugin * plugin) } subtype = g_type_register_static (type, type_name, &type_info, 0); g_free (type_name); - ret |= gst_element_register (plugin, elements[i], rank, subtype); + gst_element_register (plugin, elements[i], rank, subtype); } g_strfreev (elements); @@ -2815,7 +2814,7 @@ done: g_free (env_config_dir); g_free (config_dirs); - return ret; + return TRUE; } GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,