tools: Move gst_tools_print_version call to avoid warning from new GLib.

g_setprgname is implicitly called by g_option_context_new() with a check
to see if it's been set already.

Fixes bug #604093.
This commit is contained in:
Ole André Vadla Ravnås 2009-12-03 12:31:19 +01:00 committed by Sebastian Dröge
parent 1c66f306d6
commit 93dd95f02e
2 changed files with 4 additions and 4 deletions

View 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;

View 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 ();