From 66a5cad6c1f1feefca68e16b7c62916b25d7fd47 Mon Sep 17 00:00:00 2001 From: Matthew Waters Date: Tue, 21 Apr 2015 12:19:46 +1000 Subject: [PATCH] gldisplay: synchronize the searching and creation of GstGLContext's Ootherwise we could end up with multiple elements in different chains each creating a context. Fixes context creation with glvideomixer. --- ext/gl/gstglbasemixer.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ext/gl/gstglbasemixer.c b/ext/gl/gstglbasemixer.c index 64c019ca3a..448c6a6b7f 100644 --- a/ext/gl/gstglbasemixer.c +++ b/ext/gl/gstglbasemixer.c @@ -484,6 +484,7 @@ gst_gl_base_mixer_decide_allocation (GstGLBaseMixer * mix, GstQuery * query) _find_local_gl_context (mix); if (!mix->context) { + GST_OBJECT_LOCK (mix->display); do { if (mix->context) gst_object_unref (mix->context); @@ -497,6 +498,7 @@ gst_gl_base_mixer_decide_allocation (GstGLBaseMixer * mix, GstQuery * query) goto context_error; } } while (!gst_gl_display_add_context (mix->display, mix->context)); + GST_OBJECT_UNLOCK (mix->display); } if (mix_class->decide_allocation)