summaryrefslogtreecommitdiff
path: root/ext/gtk
diff options
context:
space:
mode:
authorMatthew Waters <matthew@centricular.com>2016-03-25 17:49:14 +1100
committerMatthew Waters <matthew@centricular.com>2016-03-25 17:49:14 +1100
commitcfbe7d1399f73345ce430739d4f2cfa82824ef53 (patch)
tree59c4aae1ff2423c787dbb0b821f536749cf35197 /ext/gtk
parentdbd12ec82b272165624025217a62169a28e6dcc0 (diff)
downloadgstreamer-plugins-bad-cfbe7d1399f73345ce430739d4f2cfa82824ef53.tar.gz
gtk/gl: don't assert when gdk doesn't provide a GL context
Allows the application to check whether gtkglsink is supported by setting the element to READY. https://bugzilla.gnome.org/show_bug.cgi?id=764148
Diffstat (limited to 'ext/gtk')
-rw-r--r--ext/gtk/gtkgstglwidget.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/ext/gtk/gtkgstglwidget.c b/ext/gtk/gtkgstglwidget.c
index c9ad0b63f..e3d08ab3b 100644
--- a/ext/gtk/gtkgstglwidget.c
+++ b/ext/gtk/gtkgstglwidget.c
@@ -420,8 +420,13 @@ _get_gl_context (GtkGstGLWidget * gst_widget)
gtk_widget_realize (GTK_WIDGET (gst_widget));
+ if (priv->other_context)
+ gst_object_unref (priv->other_context);
+ priv->other_context = NULL;
+
if (priv->gdk_context)
g_object_unref (priv->gdk_context);
+
priv->gdk_context = gtk_gl_area_get_context (GTK_GL_AREA (gst_widget));
if (priv->gdk_context == NULL) {
GError *error = gtk_gl_area_get_error (GTK_GL_AREA (gst_widget));
@@ -429,7 +434,6 @@ _get_gl_context (GtkGstGLWidget * gst_widget)
GST_ERROR_OBJECT (gst_widget, "Error creating GdkGLContext : %s",
error ? error->message : "No error set by Gdk");
g_clear_error (&error);
- g_assert_not_reached ();
return;
}