summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Waters <matthew@centricular.com>2016-06-16 00:44:48 +1000
committerJan Schmidt <jan@centricular.com>2016-08-16 02:32:01 +1000
commit27a3bc73c02ec2cd6ed204050c6627268a499ff5 (patch)
tree404b6072e318334adce1689eea6edd6971b498d1
parentb8155ed1f14e9b06b5d741317d028d279e6d425f (diff)
downloadgstreamer-plugins-bad-27a3bc73c02ec2cd6ed204050c6627268a499ff5.tar.gz
qmlglsink: propagate GL context creation failure upwards
Otherwise an application cannot know if the qmlglsink will be displaying frames incorrectly/at all.
-rw-r--r--ext/qt/qtitem.cc10
1 files changed, 8 insertions, 2 deletions
diff --git a/ext/qt/qtitem.cc b/ext/qt/qtitem.cc
index 8a73ed426..9c359f85d 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;