From 6fc5b181386c206e3cf0663cfa1087486dff1144 Mon Sep 17 00:00:00 2001 From: Julien Isorce Date: Tue, 21 Jul 2015 11:21:27 +0100 Subject: [PATCH] glstereosplit: use gst_gl_display_create_context Also unlock the lock on error. https://bugzilla.gnome.org/show_bug.cgi?id=750310 --- ext/gl/gstglstereosplit.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ext/gl/gstglstereosplit.c b/ext/gl/gstglstereosplit.c index a9e500c..9c56002 100644 --- a/ext/gl/gstglstereosplit.c +++ b/ext/gl/gstglstereosplit.c @@ -571,9 +571,11 @@ ensure_context (GstGLStereoSplit * self) self->context = gst_gl_display_get_gl_context_for_thread (self->display, NULL); if (!self->context) { - self->context = gst_gl_context_new (self->display); - if (!gst_gl_context_create (self->context, self->other_context, &error)) + if (!gst_gl_display_create_context (self->display, self->other_context, + &self->context, &error)) { + GST_OBJECT_UNLOCK (self->display); goto context_error; + } } } while (!gst_gl_display_add_context (self->display, self->context)); GST_OBJECT_UNLOCK (self->display); -- 2.7.4