mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
qml: reuse existing GstQSGTexture
Fixes a memory leak leaking the texture objects. https://bugzilla.gnome.org/show_bug.cgi?id=758286
This commit is contained in:
parent
aca25b521f
commit
1dc889c6d0
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue