glstereosplit: use gst_gl_display_create_context

Also unlock the lock on error.

https://bugzilla.gnome.org/show_bug.cgi?id=750310
This commit is contained in:
Julien Isorce 2015-07-21 11:21:27 +01:00
parent ac54fa8c95
commit 6fc5b18138

View file

@ -571,10 +571,12 @@ ensure_context (GstGLStereoSplit * self)
self->context = self->context =
gst_gl_display_get_gl_context_for_thread (self->display, NULL); gst_gl_display_get_gl_context_for_thread (self->display, NULL);
if (!self->context) { if (!self->context) {
self->context = gst_gl_context_new (self->display); if (!gst_gl_display_create_context (self->display, self->other_context,
if (!gst_gl_context_create (self->context, self->other_context, &error)) &self->context, &error)) {
GST_OBJECT_UNLOCK (self->display);
goto context_error; goto context_error;
} }
}
} while (!gst_gl_display_add_context (self->display, self->context)); } while (!gst_gl_display_add_context (self->display, self->context));
GST_OBJECT_UNLOCK (self->display); GST_OBJECT_UNLOCK (self->display);
} }