diff --git a/tools/gst-inspect.c b/tools/gst-inspect.c index 13d76da5d4..4f2723d152 100644 --- a/tools/gst-inspect.c +++ b/tools/gst-inspect.c @@ -1491,6 +1491,8 @@ main (int argc, char *argv[]) g_thread_init (NULL); + gst_tools_set_prgname ("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); diff --git a/tools/gst-launch.c b/tools/gst-launch.c index 591d631101..cb9b8e2f2e 100644 --- a/tools/gst-launch.c +++ b/tools/gst-launch.c @@ -715,6 +715,8 @@ main (int argc, char *argv[]) g_thread_init (NULL); + gst_tools_set_prgname ("gst-launch"); + #ifndef GST_DISABLE_OPTION_PARSING ctx = g_option_context_new ("PIPELINE-DESCRIPTION"); g_option_context_add_main_entries (ctx, options, GETTEXT_PACKAGE); diff --git a/tools/gst-typefind.c b/tools/gst-typefind.c index d51f282496..53635d620e 100644 --- a/tools/gst-typefind.c +++ b/tools/gst-typefind.c @@ -155,7 +155,7 @@ main (int argc, char *argv[]) g_thread_init (NULL); - gst_tools_print_version ("gst-typefind"); + gst_tools_set_prgname ("gst-typefind"); ctx = g_option_context_new ("FILES"); g_option_context_add_main_entries (ctx, options, GETTEXT_PACKAGE); @@ -166,6 +166,8 @@ main (int argc, char *argv[]) } g_option_context_free (ctx); + gst_tools_print_version ("gst-typefind"); + if (filenames == NULL || *filenames == NULL) { g_print ("Please give a filename to typefind\n\n"); return 1; diff --git a/tools/gst-xmlinspect.c b/tools/gst-xmlinspect.c index 6a8b6fdce8..4e608071ff 100644 --- a/tools/gst-xmlinspect.c +++ b/tools/gst-xmlinspect.c @@ -639,7 +639,7 @@ main (int argc, char *argv[]) g_thread_init (NULL); - gst_tools_print_version ("gst-xmlinspect"); + gst_tools_set_prgname ("gst-xmlinspect"); ctx = g_option_context_new ("[ELEMENT-NAME]"); g_option_context_add_main_entries (ctx, options, GETTEXT_PACKAGE); @@ -650,6 +650,8 @@ main (int argc, char *argv[]) } g_option_context_free (ctx); + gst_tools_print_version ("gst-xmlinspect"); + /* if no arguments, print out all elements */ if (argc == 1) { GList *features, *f; diff --git a/tools/tools.h b/tools/tools.h index a4e3371ede..93ac542eeb 100644 --- a/tools/tools.h +++ b/tools/tools.h @@ -44,12 +44,6 @@ static gboolean __gst_tools_version = FALSE; static void gst_tools_print_version (const gchar * tool) { - gchar *s; - - s = g_strdup_printf ("%s-%u.%u", tool, GST_VERSION_MAJOR, GST_VERSION_MINOR); - g_set_prgname (s); - g_free (s); - if (__gst_tools_version) { gchar *version_str; @@ -63,4 +57,14 @@ gst_tools_print_version (const gchar * tool) } } +static void +gst_tools_set_prgname (const gchar * tool) +{ + gchar *s; + + s = g_strdup_printf ("%s-%u.%u", tool, GST_VERSION_MAJOR, GST_VERSION_MINOR); + g_set_prgname (s); + g_free (s); +} + #endif /* __GST_TOOLS_H__ */