From: Matthew Waters Date: Wed, 15 Jun 2016 14:44:48 +0000 (+1000) Subject: qmlglsink: propagate GL context creation failure upwards X-Git-Tag: 1.10.4~597 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=14c6fece0972183053f23874d0b5fd7b072e40d5;p=platform%2Fupstream%2Fgst-plugins-bad.git qmlglsink: propagate GL context creation failure upwards Otherwise an application cannot know if the qmlglsink will be displaying frames incorrectly/at all. --- diff --git a/ext/qt/qtitem.cc b/ext/qt/qtitem.cc index 8a73ed4..9c359f8 100644 --- a/ext/qt/qtitem.cc +++ b/ext/qt/qtitem.cc @@ -414,6 +414,8 @@ QtGLVideoItem::onSceneGraphInvalidated () gboolean qt_item_init_winsys (QtGLVideoItem * widget) { + GError *error = NULL; + g_return_val_if_fail (widget != NULL, FALSE); g_mutex_lock (&widget->priv->lock); @@ -446,8 +448,12 @@ qt_item_init_winsys (QtGLVideoItem * widget) return FALSE; } - gst_gl_context_create (widget->priv->context, widget->priv->other_context, - NULL); + if (!gst_gl_context_create (widget->priv->context, widget->priv->other_context, + &error)) { + GST_ERROR ("%s", error->message); + g_mutex_unlock (&widget->priv->lock); + return FALSE; + } g_mutex_unlock (&widget->priv->lock); return TRUE;