Commit 7d2938dd authored by Nirbheek Chauhan's avatar Nirbheek Chauhan 🐜

gst-inspect: Fix ANSI escape sequence usage on Windows

Either disable it when it's not supported, or setup the console to
interpret them correctly when it's supported.

Closes gstreamer/gstreamer#351
parent a143d9cb
Pipeline #15238 passed with stages
in 17 minutes and 25 seconds
......@@ -2034,6 +2034,14 @@ main (int argc, char *argv[])
} else {
colored_output = FALSE;
#elif defined(G_OS_WIN32)
gint fd = _fileno (stdout);
/* On Windows 10, g_log_writer_supports_color will also setup the console
* so that it correctly interprets ANSI VT sequences if it's supported */
if (!_isatty (fd) || !g_log_writer_supports_color (fd))
colored_output = FALSE;
gst_tools_print_version ();
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