From: Roman Nowicki Date: Fri, 20 Nov 2015 00:18:43 +0000 (+1100) Subject: qml: reuse existing GstQSGTexture X-Git-Tag: 1.19.3~509^2~1695^2~58 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1dc889c6d0d84825924a7ec925275a07c966812b;p=platform%2Fupstream%2Fgstreamer.git qml: reuse existing GstQSGTexture Fixes a memory leak leaking the texture objects. https://bugzilla.gnome.org/show_bug.cgi?id=758286 --- diff --git a/ext/qt/qtitem.cc b/ext/qt/qtitem.cc index ec2e859..ca8e535 100644 --- a/ext/qt/qtitem.cc +++ b/ext/qt/qtitem.cc @@ -205,12 +205,12 @@ QtGLVideoItem::updatePaintNode(QSGNode * oldNode, if (!texNode) { texNode = new QSGSimpleTextureNode (); texNode->setOwnsTexture (true); + texNode->setTexture (new GstQSGTexture ()); } - tex = new GstQSGTexture (); + tex = static_cast (texNode->texture()); tex->setCaps (this->priv->caps); tex->setBuffer (this->priv->buffer); - texNode->setTexture (tex); if (this->priv->force_aspect_ratio) { src.w = this->priv->display_width;