diff options
author | Jose Quaresma <quaresma.jose@gmail.com> | 2020-10-10 22:09:03 +0300 |
---|---|---|
committer | GStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org> | 2021-04-08 01:56:47 +0300 |
commit | 9f958058697e6fbf5bde325228034572331d1a3a (patch) | |
tree | 1a5c97c90027a57ac7e458e0c28038e3b5fcf8b9 | |
parent | 10b38146e8f10b52ce60e97ad3f2172b40a84db8 (diff) |
gstpluginloader: when env var is set do not fall through to system plugin scanner
If we set a custom GST_PLUGIN_SCANNER env var, then we probably want to use that and only that.
Falling through to the one installed on the system is problamatic in cross-compilation
environemnts, regardless of whether one pointed to by the env var succeeded or failed.
taken from:
http://cgit.openembedded.org/openembedded-core/commit/meta/recipes-multimedia/gstreamer/gstreamer1.0/0001-gst-gstpluginloader.c-when-env-var-is-set-do-not-fal.patch?id=0db7ba34ca41b107042306d13a6f0162885c123b
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/669>
-rw-r--r-- | gst/gstpluginloader.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/gst/gstpluginloader.c b/gst/gstpluginloader.c index 621b243496..4e0f64650c 100644 --- a/gst/gstpluginloader.c +++ b/gst/gstpluginloader.c @@ -464,20 +464,19 @@ gst_plugin_loader_spawn (GstPluginLoader * loader) if (loader->child_running) return TRUE; - /* Find the gst-plugin-scanner: first try the env-var if it is set, - * otherwise use the installed version */ + /* Find the gst-plugin-scanner */ env = g_getenv ("GST_PLUGIN_SCANNER_1_0"); if (env == NULL) env = g_getenv ("GST_PLUGIN_SCANNER"); if (env != NULL && *env != '\0') { + /* use the env-var if it is set */ GST_LOG ("Trying GST_PLUGIN_SCANNER env var: %s", env); helper_bin = g_strdup (env); res = gst_plugin_loader_try_helper (loader, helper_bin); g_free (helper_bin); - } - - if (!res) { + } else { + /* use the installed version */ GST_LOG ("Trying installed plugin scanner"); #ifdef G_OS_WIN32 @@ -497,10 +496,10 @@ gst_plugin_loader_spawn (GstPluginLoader * loader) #endif res = gst_plugin_loader_try_helper (loader, helper_bin); g_free (helper_bin); + } - if (!res) { - GST_INFO ("No gst-plugin-scanner available, or not working"); - } + if (!res) { + GST_INFO ("No gst-plugin-scanner available, or not working"); } return loader->child_running; |