From ae64113c2fd8150748feedda9b49d84c54d85814 Mon Sep 17 00:00:00 2001 From: Yoann Lopes Date: Tue, 15 Jan 2013 16:27:49 +0100 Subject: [PATCH] Fixed QSGVideoNodes not deleting their materials. Change-Id: Ia7597ade3066c23c54354e2cc36c907e6bf0dfea Reviewed-by: Gunnar Sletta --- src/imports/multimedia/qsgvideonode_i420.cpp | 1 + src/imports/multimedia/qsgvideonode_rgb.cpp | 1 + src/imports/multimedia/qsgvideonode_texture.cpp | 1 + 3 files changed, 3 insertions(+) diff --git a/src/imports/multimedia/qsgvideonode_i420.cpp b/src/imports/multimedia/qsgvideonode_i420.cpp index af81b6a..dc0b60b 100644 --- a/src/imports/multimedia/qsgvideonode_i420.cpp +++ b/src/imports/multimedia/qsgvideonode_i420.cpp @@ -286,6 +286,7 @@ void QSGVideoMaterial_YUV420::bindTexture(int id, int w, int h, const uchar *bit QSGVideoNode_I420::QSGVideoNode_I420(const QVideoSurfaceFormat &format) : m_format(format) { + setFlag(QSGNode::OwnsMaterial); m_material = new QSGVideoMaterial_YUV420(format); setMaterial(m_material); } diff --git a/src/imports/multimedia/qsgvideonode_rgb.cpp b/src/imports/multimedia/qsgvideonode_rgb.cpp index 99ae6c0..b0fb7dc 100644 --- a/src/imports/multimedia/qsgvideonode_rgb.cpp +++ b/src/imports/multimedia/qsgvideonode_rgb.cpp @@ -249,6 +249,7 @@ public: QSGVideoNode_RGB::QSGVideoNode_RGB(const QVideoSurfaceFormat &format) : m_format(format) { + setFlag(QSGNode::OwnsMaterial); m_material = new QSGVideoMaterial_RGB(format); setMaterial(m_material); } diff --git a/src/imports/multimedia/qsgvideonode_texture.cpp b/src/imports/multimedia/qsgvideonode_texture.cpp index 4cbd80f..80a42e5 100644 --- a/src/imports/multimedia/qsgvideonode_texture.cpp +++ b/src/imports/multimedia/qsgvideonode_texture.cpp @@ -227,6 +227,7 @@ public: QSGVideoNode_Texture::QSGVideoNode_Texture(const QVideoSurfaceFormat &format) : m_format(format) { + setFlag(QSGNode::OwnsMaterial); m_material = new QSGVideoMaterial_Texture(format); setMaterial(m_material); } -- 2.7.4