summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Borovkov <sergey.borovkov@wireload.net>2016-03-01 18:22:37 +0300
committerTim-Philipp Müller <tim@centricular.com>2016-04-06 14:22:32 +0100
commitb4453835109a5d50dc34aac0c851c1fb75049459 (patch)
tree1db683df4f710a327f88ac014f7690631445eee8
parent891dbc9c9d9a3a2ceb3e1404276d0120a67357b5 (diff)
downloadgstreamer-plugins-bad-b4453835109a5d50dc34aac0c851c1fb75049459.tar.gz
qml: Fix leak of the OpenGL contexts
[Matthew Waters]: add NULL checks before unreffing https://bugzilla.gnome.org/show_bug.cgi?id=762999
-rw-r--r--ext/qt/qtitem.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/ext/qt/qtitem.cc b/ext/qt/qtitem.cc
index ab64d9e97..006cfaf4c 100644
--- a/ext/qt/qtitem.cc
+++ b/ext/qt/qtitem.cc
@@ -129,7 +129,10 @@ QtGLVideoItem::QtGLVideoItem()
QtGLVideoItem::~QtGLVideoItem()
{
g_mutex_clear (&this->priv->lock);
-
+ if (this->priv->context)
+ gst_object_unref(this->priv->context);
+ if (this->priv->other_context)
+ gst_object_unref(this->priv->other_context);
g_free (this->priv);
this->priv = NULL;
}