Revert "tools: Move gst_tools_print_version call to avoid warning from new GLib."
authorTim-Philipp Müller <tim.muller@collabora.co.uk>
Tue, 16 Feb 2010 11:24:33 +0000 (11:24 +0000)
committerTim-Philipp Müller <tim.muller@collabora.co.uk>
Tue, 16 Feb 2010 11:33:19 +0000 (11:33 +0000)
This reverts commit 93dd95f02ef3fa530f54ce81e8ffba96f3b679cb.

This commit made --version not work any longer. The g_setprgname()
warning is fixed in recent GLib versions.

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

index 743e621..13d76da 100644 (file)
@@ -1491,8 +1491,6 @@ main (int argc, char *argv[])
 
   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);
@@ -1506,6 +1504,8 @@ 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 caca18b..591d631 100644 (file)
@@ -715,8 +715,6 @@ main (int argc, char *argv[])
 
   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);
@@ -733,6 +731,8 @@ 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 ();