diff options
author | Matthew Waters <matthew@centricular.com> | 2015-04-21 12:19:46 +1000 |
---|---|---|
committer | Matthew Waters <matthew@centricular.com> | 2015-04-21 12:55:24 +1000 |
commit | 6cb6d8f9e8585d12b50731d4431d9ab467c5a67d (patch) | |
tree | 1b92ea03a88f8050039ea00ba52d8026747e8191 /ext/gl/gstglbasemixer.c | |
parent | 8ba1fbbe6480ff7f8b5a451cb10c7d5c76ec1bad (diff) | |
download | gstreamer-plugins-bad-6cb6d8f9e8585d12b50731d4431d9ab467c5a67d.tar.gz |
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.
Diffstat (limited to 'ext/gl/gstglbasemixer.c')
-rw-r--r-- | ext/gl/gstglbasemixer.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ext/gl/gstglbasemixer.c b/ext/gl/gstglbasemixer.c index 64c019ca3..448c6a6b7 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) |