if (!this->qt_context_)
return;
- gst_gl_context_activate (this->qt_context_, TRUE);
-
if (!this->buffer_)
goto out;
if (GST_VIDEO_INFO_FORMAT (&this->v_info) == GST_VIDEO_FORMAT_UNKNOWN)
funcs->glBindTexture (GL_TEXTURE_2D, this->dummy_tex_id_);
}
-
- gst_gl_context_activate (this->qt_context_, FALSE);
}
/* can be called from any thread */
GstQSGTexture *tex;
g_mutex_lock (&this->priv->lock);
- gst_gl_context_activate (this->priv->other_context, TRUE);
+
+ if (gst_gl_context_get_current() == NULL)
+ gst_gl_context_activate (this->priv->other_context, TRUE);
GST_TRACE ("%p updatePaintNode", this);
texNode->setRect (QRectF (result.x, result.y, result.w, result.h));
- gst_gl_context_activate (this->priv->other_context, FALSE);
g_mutex_unlock (&this->priv->lock);
return texNode;