diff --git a/ext/qt/qtitem.cc b/ext/qt/qtitem.cc index ec2e859d24..ca8e535fe3 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;