mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-28 20:51:13 +00:00
plugin dependencies: fix 6cddce7663
There were a few errors: * The plugin scanner now accepts executable path as an argument. In case it is NULL, argc == 2 * We find the executable path in init_pre instead of gst_init, allowing this to work when gst is initialized through the option group (eg gst-inspect) * There was a semi-colon missing in the __APPLE__ #ifdef
This commit is contained in:
parent
6cddce7663
commit
a5e168071c
2 changed files with 12 additions and 7 deletions
|
@ -356,8 +356,8 @@ find_executable_path (void)
|
|||
pid = getpid ();
|
||||
ret = proc_pidpath (pid, pathbuf, sizeof (pathbuf));
|
||||
if (ret > 0)
|
||||
_gst_executable_path = g_strdup (pathbuf)
|
||||
}
|
||||
_gst_executable_path = g_strdup (pathbuf);
|
||||
}
|
||||
#else
|
||||
static void
|
||||
find_executable_path (void)
|
||||
|
@ -399,9 +399,6 @@ gst_init_check (int *argc, char **argv[], GError ** err)
|
|||
g_mutex_unlock (&init_lock);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
find_executable_path ();
|
||||
|
||||
#ifndef GST_DISABLE_OPTION_PARSING
|
||||
ctx = g_option_context_new ("- GStreamer initialization");
|
||||
g_option_context_set_ignore_unknown_options (ctx, TRUE);
|
||||
|
@ -533,6 +530,8 @@ init_pre (GOptionContext * context, GOptionGroup * group, gpointer data,
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
find_executable_path ();
|
||||
|
||||
_priv_gst_start_time = gst_util_get_timestamp ();
|
||||
|
||||
#ifndef GST_DISABLE_GST_DEBUG
|
||||
|
|
|
@ -38,7 +38,11 @@ main (int argc, char *argv[])
|
|||
char **my_argv;
|
||||
int my_argc;
|
||||
|
||||
if (argc != 3 || strcmp (argv[1], "-l"))
|
||||
/* We may or may not have an executable path */
|
||||
if (argc != 2 && argc != 3)
|
||||
return 1;
|
||||
|
||||
if (strcmp (argv[1], "-l"))
|
||||
return 1;
|
||||
|
||||
my_argc = 2;
|
||||
|
@ -50,7 +54,9 @@ main (int argc, char *argv[])
|
|||
_gst_disable_registry_cache = TRUE;
|
||||
#endif
|
||||
|
||||
_gst_executable_path = g_strdup (argv[2]);
|
||||
if (argc == 3)
|
||||
_gst_executable_path = g_strdup (argv[2]);
|
||||
|
||||
res = gst_init_check (&my_argc, &my_argv, NULL);
|
||||
|
||||
g_free (my_argv);
|
||||
|
|
Loading…
Reference in a new issue