mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-05 15:08:53 +00:00
gst/gst.c (gst_init_check_with_popt_table): Do not fail on errors, like gtk. It makes it more useful in bindings.
Original commit message from CVS: * gst/gst.c (gst_init_check_with_popt_table): Do not fail on errors, like gtk. It makes it more useful in bindings.
This commit is contained in:
parent
452faea68a
commit
b748b61e9f
2 changed files with 20 additions and 12 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2004-06-10 Johan Dahlin <johan@gnome.org>
|
||||||
|
|
||||||
|
* gst/gst.c (gst_init_check_with_popt_table): Do not fail on
|
||||||
|
errors, like gtk. It makes it more useful in bindings.
|
||||||
|
|
||||||
2004-06-09 Thomas Vander Stichele <thomas at apestaart dot org>
|
2004-06-09 Thomas Vander Stichele <thomas at apestaart dot org>
|
||||||
|
|
||||||
* docs/random/gdp:
|
* docs/random/gdp:
|
||||||
|
|
15
gst/gst.c
15
gst/gst.c
|
@ -363,13 +363,14 @@ gst_init_check_with_popt_table (int *argc, char **argv[],
|
||||||
if (gst_debug_env)
|
if (gst_debug_env)
|
||||||
parse_debug_list (gst_debug_env);
|
parse_debug_list (gst_debug_env);
|
||||||
|
|
||||||
while ((nextopt = poptGetNextOpt (context)) > 0) {
|
/* Scan until we reach the end (-1), ignoring errors */
|
||||||
/* we only check for failures here, actual work is done in callbacks */
|
while ((nextopt = poptGetNextOpt (context)) != -1) {
|
||||||
if (_gst_initialization_failure)
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (nextopt != -1) {
|
/* If an error occurred and it's not an missing options, throw an error
|
||||||
|
* We don't want to show the "unknown option" message, since it'll
|
||||||
|
* might interfere with the applications own command line parsing
|
||||||
|
*/
|
||||||
|
if (nextopt < 0 && nextopt != POPT_ERROR_BADOPT) {
|
||||||
g_print ("Error on option %s: %s.\nRun '%s --help' "
|
g_print ("Error on option %s: %s.\nRun '%s --help' "
|
||||||
"to see a full list of available command line options.\n",
|
"to see a full list of available command line options.\n",
|
||||||
poptBadOption (context, 0), poptStrerror (nextopt), (*argv)[0]);
|
poptBadOption (context, 0), poptStrerror (nextopt), (*argv)[0]);
|
||||||
|
@ -377,6 +378,7 @@ gst_init_check_with_popt_table (int *argc, char **argv[],
|
||||||
poptFreeContext (context);
|
poptFreeContext (context);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
*argc = poptStrippedArgv (context, *argc, *argv);
|
*argc = poptStrippedArgv (context, *argc, *argv);
|
||||||
|
|
||||||
|
@ -621,6 +623,7 @@ init_post (void)
|
||||||
gst_registry_pool_add (_global_registry, 100);
|
gst_registry_pool_add (_global_registry, 100);
|
||||||
gst_registry_pool_add (_user_registry, 50);
|
gst_registry_pool_add (_user_registry, 50);
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
gst_registry_pool_add (_global_registry, 100);
|
gst_registry_pool_add (_global_registry, 100);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue