gst: Don't intercept --help in gst_init()
authorHans de Goede <hdegoede@redhat.com>
Thu, 13 Jun 2013 06:36:23 +0000 (08:36 +0200)
committerSebastian Dröge <slomo@circular-chaos.org>
Thu, 13 Jun 2013 06:37:28 +0000 (08:37 +0200)
Before this patch gst_init would intercept --help, causing for example
cheese's --help to look like this:

[hans@shalem cheese]$ cheese --help
Usage:
  cheese [OPTION...] - GStreamer initialization

Help Options:
  -h, --help                        Show help options
  --help-all                        Show all help options
  --help-gst                        Show GStreamer Options

gst_init is the only gfoo_init function which does this.

https://bugzilla.gnome.org/show_bug.cgi?id=702089

gst/gst.c

index bd748c7..950fc18 100644 (file)
--- a/gst/gst.c
+++ b/gst/gst.c
@@ -327,6 +327,7 @@ gst_init_check (int *argc, char **argv[], GError ** err)
 #ifndef GST_DISABLE_OPTION_PARSING
   ctx = g_option_context_new ("- GStreamer initialization");
   g_option_context_set_ignore_unknown_options (ctx, TRUE);
+  g_option_context_set_help_enabled (ctx, FALSE);
   group = gst_init_get_option_group ();
   g_option_context_add_group (ctx, group);
   res = g_option_context_parse (ctx, argc, argv, err);