Commit 93dd95f0 authored by Ole Andre Vadla Ravnaas's avatar Ole Andre Vadla Ravnaas Committed by Sebastian Dröge
Browse files

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.
parent 1c66f306
...@@ -1492,6 +1492,8 @@ main (int argc, char *argv[]) ...@@ -1492,6 +1492,8 @@ main (int argc, char *argv[])
if (!g_thread_supported ()) if (!g_thread_supported ())
g_thread_init (NULL); g_thread_init (NULL);
gst_tools_print_version ("gst-inspect");
#ifndef GST_DISABLE_OPTION_PARSING #ifndef GST_DISABLE_OPTION_PARSING
ctx = g_option_context_new ("[ELEMENT-NAME | PLUGIN-NAME]"); ctx = g_option_context_new ("[ELEMENT-NAME | PLUGIN-NAME]");
g_option_context_add_main_entries (ctx, options, GETTEXT_PACKAGE); g_option_context_add_main_entries (ctx, options, GETTEXT_PACKAGE);
...@@ -1505,8 +1507,6 @@ main (int argc, char *argv[]) ...@@ -1505,8 +1507,6 @@ main (int argc, char *argv[])
gst_init (&argc, &argv); gst_init (&argc, &argv);
#endif #endif
gst_tools_print_version ("gst-inspect");
if (print_all && argc > 1) { if (print_all && argc > 1) {
g_print ("-a requires no extra arguments\n"); g_print ("-a requires no extra arguments\n");
return 1; return 1;
......
...@@ -710,6 +710,8 @@ main (int argc, char *argv[]) ...@@ -710,6 +710,8 @@ main (int argc, char *argv[])
if (!g_thread_supported ()) if (!g_thread_supported ())
g_thread_init (NULL); g_thread_init (NULL);
gst_tools_print_version ("gst-launch");
#ifndef GST_DISABLE_OPTION_PARSING #ifndef GST_DISABLE_OPTION_PARSING
ctx = g_option_context_new ("PIPELINE-DESCRIPTION"); ctx = g_option_context_new ("PIPELINE-DESCRIPTION");
g_option_context_add_main_entries (ctx, options, GETTEXT_PACKAGE); g_option_context_add_main_entries (ctx, options, GETTEXT_PACKAGE);
...@@ -726,8 +728,6 @@ main (int argc, char *argv[]) ...@@ -726,8 +728,6 @@ main (int argc, char *argv[])
gst_init (&argc, &argv); gst_init (&argc, &argv);
#endif #endif
gst_tools_print_version ("gst-launch");
#ifndef DISABLE_FAULT_HANDLER #ifndef DISABLE_FAULT_HANDLER
if (!no_fault) if (!no_fault)
fault_setup (); fault_setup ();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment