summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoman Nowicki <rnowicki@sims.pl>2015-11-20 11:18:43 +1100
committerMatthew Waters <matthew@centricular.com>2015-11-20 11:26:52 +1100
commitc3762420f708399b41628bf65f6ffd0d1f2d8a3a (patch)
tree9a712d968e043346b515ecaf0ea56f550ffa20f6
parenta65fa45c2e58cb9d269dc63c1c3cf4c3ef3ebe85 (diff)
downloadgstreamer-plugins-bad-c3762420f708399b41628bf65f6ffd0d1f2d8a3a.tar.gz
qml: reuse existing GstQSGTexture
Fixes a memory leak leaking the texture objects. https://bugzilla.gnome.org/show_bug.cgi?id=758286
-rw-r--r--ext/qt/qtitem.cc6
1 files changed, 2 insertions, 4 deletions
diff --git a/ext/qt/qtitem.cc b/ext/qt/qtitem.cc
index 63060e163..5786c4110 100644
--- a/ext/qt/qtitem.cc
+++ b/ext/qt/qtitem.cc
@@ -183,14 +183,12 @@ QtGLVideoItem::updatePaintNode(QSGNode * oldNode,
if (!texNode) {
texNode = new QSGSimpleTextureNode ();
texNode->setOwnsTexture (true);
- } else {
- tex = static_cast<GstQSGTexture *> (texNode->texture());
+ texNode->setTexture (new GstQSGTexture ());
}
- tex = new GstQSGTexture ();
+ tex = static_cast<GstQSGTexture *> (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;