Fixed QSGVideoNodes not deleting their materials.
authorYoann Lopes <yoann.lopes@digia.com>
Tue, 15 Jan 2013 15:27:49 +0000 (16:27 +0100)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Tue, 15 Jan 2013 16:38:23 +0000 (17:38 +0100)
Change-Id: Ia7597ade3066c23c54354e2cc36c907e6bf0dfea
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
src/imports/multimedia/qsgvideonode_i420.cpp
src/imports/multimedia/qsgvideonode_rgb.cpp
src/imports/multimedia/qsgvideonode_texture.cpp

index af81b6a..dc0b60b 100644 (file)
@@ -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);
 }
index 99ae6c0..b0fb7dc 100644 (file)
@@ -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);
 }
index 4cbd80f..80a42e5 100644 (file)
@@ -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);
 }