tools: gst-launch: set GST_GL_XINITTHREADS
authorNicolas Dechesne <nicolas.dechesne@linaro.org>
Thu, 22 Dec 2016 17:45:10 +0000 (18:45 +0100)
committerSebastian Dröge <sebastian@centricular.com>
Mon, 9 Jan 2017 13:41:06 +0000 (15:41 +0200)
This ensure that XInitThreads is called and so gl contexts are properly
initialized.

https://bugzilla.gnome.org/show_bug.cgi?id=776401

tools/gst-launch.c

index 2de754d94e655fe8aa876684b6a07143fb55ec90..c1f9ef7e4b837a226db20ae1d6eaf789445edc50 100644 (file)
@@ -1005,6 +1005,8 @@ main (int argc, char *argv[])
 #endif
 
   g_set_prgname ("gst-launch-" GST_API_VERSION);
+  /* Ensure XInitThreads() is called if/when needed */
+  g_setenv ("GST_GL_XINITTHREADS", "1", TRUE);
 
 #ifndef GST_DISABLE_OPTION_PARSING
   ctx = g_option_context_new ("PIPELINE-DESCRIPTION");