diff options
author | Matthew Waters <ystreet00@gmail.com> | 2014-06-24 23:51:24 +1000 |
---|---|---|
committer | Matthew Waters <ystreet00@gmail.com> | 2014-06-24 23:51:24 +1000 |
commit | 5409a3ea2f5bb76e11b922834c6877bffc463924 (patch) | |
tree | 0b3638fd3b70416a750e30ba8ef5bd07a26e3130 /ext/gl/gstopengl.c | |
parent | 1d16cd50a3f07198e2519adec8e52b2b5b21ea14 (diff) | |
download | gstreamer-plugins-bad-5409a3ea2f5bb76e11b922834c6877bffc463924.tar.gz |
gl: XInitThreads when env variable is set
This is too allow gst-launch debugging with multiple GL contexts as
well as avoiding segfaulting innocent gtk+ apps that have not called
XInitThreads.
https://bugzilla.gnome.org/show_bug.cgi?id=731525
Diffstat (limited to 'ext/gl/gstopengl.c')
-rw-r--r-- | ext/gl/gstopengl.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/ext/gl/gstopengl.c b/ext/gl/gstopengl.c index bb692d77e..471d5acf0 100644 --- a/ext/gl/gstopengl.c +++ b/ext/gl/gstopengl.c @@ -77,6 +77,10 @@ #include <bcm_host.h> #endif +#if GST_GL_HAVE_WINDOW_X11 +#include <X11/Xlib.h> +#endif + #define GST_CAT_DEFAULT gst_gl_gstgl_debug GST_DEBUG_CATEGORY_STATIC (GST_CAT_DEFAULT); @@ -91,6 +95,11 @@ plugin_init (GstPlugin * plugin) bcm_host_init (); #endif +#if GST_GL_HAVE_WINDOW_X11 + if (g_getenv ("GST_GL_XINITTHREADS")) + XInitThreads (); +#endif + if (!gst_element_register (plugin, "glimagesink", GST_RANK_SECONDARY, GST_TYPE_GLIMAGE_SINK)) { return FALSE; |