Commit 1dc889c6 authored by Roman Nowicki's avatar Roman Nowicki Committed by Matthew Waters

qml: reuse existing GstQSGTexture

Fixes a memory leak leaking the texture objects.

https://bugzilla.gnome.org/show_bug.cgi?id=758286
parent aca25b52
......@@ -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<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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment