mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-15 13:53:19 +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>
|
||||
|
||||
* 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)
|
||||
parse_debug_list (gst_debug_env);
|
||||
|
||||
while ((nextopt = poptGetNextOpt (context)) > 0) {
|
||||
/* we only check for failures here, actual work is done in callbacks */
|
||||
if (_gst_initialization_failure)
|
||||
return FALSE;
|
||||
}
|
||||
/* Scan until we reach the end (-1), ignoring errors */
|
||||
while ((nextopt = poptGetNextOpt (context)) != -1) {
|
||||
|
||||
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' "
|
||||
"to see a full list of available command line options.\n",
|
||||
poptBadOption (context, 0), poptStrerror (nextopt), (*argv)[0]);
|
||||
|
@ -377,6 +378,7 @@ gst_init_check_with_popt_table (int *argc, char **argv[],
|
|||
poptFreeContext (context);
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
*argc = poptStrippedArgv (context, *argc, *argv);
|
||||
|
||||
|
@ -621,6 +623,7 @@ init_post (void)
|
|||
gst_registry_pool_add (_global_registry, 100);
|
||||
gst_registry_pool_add (_user_registry, 50);
|
||||
} else {
|
||||
|
||||
gst_registry_pool_add (_global_registry, 100);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue