diff --git a/subprojects/gst-plugins-bad/tools/gst-transcoder.c b/subprojects/gst-plugins-bad/tools/gst-transcoder.c index dccf3eb2c6..b7a7673b83 100644 --- a/subprojects/gst-plugins-bad/tools/gst-transcoder.c +++ b/subprojects/gst-plugins-bad/tools/gst-transcoder.c @@ -373,6 +373,10 @@ real_main (int argc, char *argv[]) g_option_context_free (ctx); return 1; } +#ifdef G_OS_WIN32 + argc = g_strv_length (argv); +#endif + gst_pb_utils_init (); if (settings.list) { diff --git a/subprojects/gst-plugins-base/tools/gst-device-monitor.c b/subprojects/gst-plugins-base/tools/gst-device-monitor.c index aa65f59aa4..8edc74010d 100644 --- a/subprojects/gst-plugins-base/tools/gst-device-monitor.c +++ b/subprojects/gst-plugins-base/tools/gst-device-monitor.c @@ -337,6 +337,10 @@ real_main (int argc, char **argv) } g_option_context_free (ctx); +#ifdef G_OS_WIN32 + argc = g_strv_length (argv); +#endif + GST_DEBUG_CATEGORY_INIT (devmon_debug, "device-monitor", 0, "gst-device-monitor"); diff --git a/subprojects/gst-plugins-base/tools/gst-discoverer.c b/subprojects/gst-plugins-base/tools/gst-discoverer.c index a50f5aaee4..b042be535d 100644 --- a/subprojects/gst-plugins-base/tools/gst-discoverer.c +++ b/subprojects/gst-plugins-base/tools/gst-discoverer.c @@ -685,6 +685,10 @@ real_main (int argc, char **argv) g_option_context_free (ctx); +#ifdef G_OS_WIN32 + argc = g_strv_length (argv); +#endif + if (argc < 2) { g_print ("usage: %s \n", argv[0]); exit (-1); diff --git a/subprojects/gst-plugins-base/tools/gst-play.c b/subprojects/gst-plugins-base/tools/gst-play.c index ee8847d2f1..83ec344cf8 100644 --- a/subprojects/gst-plugins-base/tools/gst-play.c +++ b/subprojects/gst-plugins-base/tools/gst-play.c @@ -1711,6 +1711,10 @@ real_main (int argc, char **argv) } g_option_context_free (ctx); +#ifdef G_OS_WIN32 + argc = g_strv_length (argv); +#endif + GST_DEBUG_CATEGORY_INIT (play_debug, "play", 0, "gst-play"); if (print_version) { diff --git a/subprojects/gstreamer/tools/gst-inspect.c b/subprojects/gstreamer/tools/gst-inspect.c index b7864be95b..2cff914a22 100644 --- a/subprojects/gstreamer/tools/gst-inspect.c +++ b/subprojects/gstreamer/tools/gst-inspect.c @@ -2189,6 +2189,10 @@ real_main (int argc, char *argv[]) gst_init (&argc, &argv); #endif +#if defined(G_OS_WIN32) && !defined(GST_CHECK_MAIN) + argc = g_strv_length (argv); +#endif + gst_tools_print_version (); if (print_all && argc > 1) { diff --git a/subprojects/gstreamer/tools/gst-launch.c b/subprojects/gstreamer/tools/gst-launch.c index 9ad8a4fe40..efc76fd120 100644 --- a/subprojects/gstreamer/tools/gst-launch.c +++ b/subprojects/gstreamer/tools/gst-launch.c @@ -1178,6 +1178,10 @@ real_main (int argc, char *argv[]) gst_init (&argc, &argv); #endif +#ifdef G_OS_WIN32 + argc = g_strv_length (argv); +#endif + gst_tools_print_version (); #ifdef G_OS_UNIX diff --git a/subprojects/gstreamer/tools/gst-stats.c b/subprojects/gstreamer/tools/gst-stats.c index 82d5cc8ffd..93ff820cd5 100644 --- a/subprojects/gstreamer/tools/gst-stats.c +++ b/subprojects/gstreamer/tools/gst-stats.c @@ -1301,6 +1301,10 @@ main (gint argc, gchar * argv[]) } g_option_context_free (ctx); +#ifdef G_OS_WIN32 + argc = g_strv_length (argv); +#endif + gst_tools_print_version (); if (filenames == NULL || *filenames == NULL) { diff --git a/subprojects/gstreamer/tools/gst-typefind.c b/subprojects/gstreamer/tools/gst-typefind.c index 7f0b4db195..38fc89445f 100644 --- a/subprojects/gstreamer/tools/gst-typefind.c +++ b/subprojects/gstreamer/tools/gst-typefind.c @@ -177,6 +177,10 @@ real_main (int argc, char *argv[]) } g_option_context_free (ctx); +#ifdef G_OS_WIN32 + argc = g_strv_length (argv); +#endif + gst_tools_print_version (); if (filenames == NULL || *filenames == NULL) {