From 6125ea7e9778f52cf36f5a797bf6429c7a61a4da Mon Sep 17 00:00:00 2001 From: Julien Isorce Date: Tue, 21 Jul 2015 11:23:21 +0100 Subject: gstglwidget: use gst_gl_display_create_context Also handle the failure case. https://bugzilla.gnome.org/show_bug.cgi?id=750310 --- ext/gtk/gtkgstglwidget.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'ext/gtk') diff --git a/ext/gtk/gtkgstglwidget.c b/ext/gtk/gtkgstglwidget.c index f8b8d267e..378632cb0 100644 --- a/ext/gtk/gtkgstglwidget.c +++ b/ext/gtk/gtkgstglwidget.c @@ -530,6 +530,7 @@ gboolean gtk_gst_gl_widget_init_winsys (GtkGstGLWidget * gst_widget) { GtkGstGLWidgetPrivate *priv = gst_widget->priv; + GError *error = NULL; g_return_val_if_fail (GTK_IS_GST_GL_WIDGET (gst_widget), FALSE); @@ -551,15 +552,13 @@ gtk_gst_gl_widget_init_winsys (GtkGstGLWidget * gst_widget) return FALSE; } - priv->context = gst_gl_context_new (priv->display); - - if (!priv->context) { + if (!gst_gl_display_create_context (priv->display, priv->other_context, + &priv->context, &error)) { + g_clear_error (&error); GTK_GST_BASE_WIDGET_UNLOCK (gst_widget); return FALSE; } - gst_gl_context_create (priv->context, priv->other_context, NULL); - GTK_GST_BASE_WIDGET_UNLOCK (gst_widget); return TRUE; } -- cgit v1.2.1