tools: Move gst_tools_print_version call to avoid warning from new GLib.
authorOle André Vadla Ravnås <ole.andre.ravnas@tandberg.com>
Thu, 3 Dec 2009 11:31:19 +0000 (12:31 +0100)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Wed, 9 Dec 2009 06:24:22 +0000 (07:24 +0100)
g_setprgname is implicitly called by g_option_context_new() with a check
to see if it's been set already.

Fixes bug #604093.

tools/gst-inspect.c
tools/gst-launch.c

index b2502f4..eb486d2 100644 (file)
@@ -1492,6 +1492,8 @@ main (int argc, char *argv[])
   if (!g_thread_supported ())
     g_thread_init (NULL);
 
+  gst_tools_print_version ("gst-inspect");
+
 #ifndef GST_DISABLE_OPTION_PARSING
   ctx = g_option_context_new ("[ELEMENT-NAME | PLUGIN-NAME]");
   g_option_context_add_main_entries (ctx, options, GETTEXT_PACKAGE);
@@ -1505,8 +1507,6 @@ main (int argc, char *argv[])
   gst_init (&argc, &argv);
 #endif
 
-  gst_tools_print_version ("gst-inspect");
-
   if (print_all && argc > 1) {
     g_print ("-a requires no extra arguments\n");
     return 1;
index 38059ad..c5e418b 100644 (file)
@@ -710,6 +710,8 @@ main (int argc, char *argv[])
   if (!g_thread_supported ())
     g_thread_init (NULL);
 
+  gst_tools_print_version ("gst-launch");
+
 #ifndef GST_DISABLE_OPTION_PARSING
   ctx = g_option_context_new ("PIPELINE-DESCRIPTION");
   g_option_context_add_main_entries (ctx, options, GETTEXT_PACKAGE);
@@ -726,8 +728,6 @@ main (int argc, char *argv[])
   gst_init (&argc, &argv);
 #endif
 
-  gst_tools_print_version ("gst-launch");
-
 #ifndef DISABLE_FAULT_HANDLER
   if (!no_fault)
     fault_setup ();