From 884e68c713bbd7f81885b4f53ac0f741da53a9b8 Mon Sep 17 00:00:00 2001 From: Julien Isorce Date: Fri, 19 Jun 2015 11:57:06 +0100 Subject: [PATCH] gl: use gst_gl_display_create_context in more elements. glbasefilter, glbasemixer and gltestsrc. https://bugzilla.gnome.org/show_bug.cgi?id=750310 --- ext/gl/gstglbasemixer.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/ext/gl/gstglbasemixer.c b/ext/gl/gstglbasemixer.c index d462c161ad..f8c8d193d5 100644 --- a/ext/gl/gstglbasemixer.c +++ b/ext/gl/gstglbasemixer.c @@ -469,15 +469,16 @@ gst_gl_base_mixer_decide_allocation (GstGLBaseMixer * mix, GstQuery * query) if (!mix->context) { GST_OBJECT_LOCK (mix->display); do { - if (mix->context) + if (mix->context) { gst_object_unref (mix->context); + mix->context = NULL; + } /* just get a GL context. we don't care */ mix->context = gst_gl_display_get_gl_context_for_thread (mix->display, NULL); if (!mix->context) { - mix->context = gst_gl_context_new (mix->display); - if (!gst_gl_context_create (mix->context, mix->priv->other_context, - &error)) { + if (!gst_gl_display_create_context (mix->display, + mix->priv->other_context, &mix->context, &error)) { GST_OBJECT_UNLOCK (mix->display); goto context_error; }