diff options
author | Yoann Lopes <yoann.lopes@digia.com> | 2013-01-15 16:27:49 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-01-15 17:38:23 +0100 |
commit | ae64113c2fd8150748feedda9b49d84c54d85814 (patch) | |
tree | bfce8d91cc3f41264e58f7fa02b80dcf2678bd83 | |
parent | 59300885fdbc949c40ea7d5282532c9850b5a2ab (diff) |
Fixed QSGVideoNodes not deleting their materials.
Change-Id: Ia7597ade3066c23c54354e2cc36c907e6bf0dfea
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
-rw-r--r-- | src/imports/multimedia/qsgvideonode_i420.cpp | 1 | ||||
-rw-r--r-- | src/imports/multimedia/qsgvideonode_rgb.cpp | 1 | ||||
-rw-r--r-- | src/imports/multimedia/qsgvideonode_texture.cpp | 1 |
3 files changed, 3 insertions, 0 deletions
diff --git a/src/imports/multimedia/qsgvideonode_i420.cpp b/src/imports/multimedia/qsgvideonode_i420.cpp index af81b6ab4..dc0b60bb9 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 99ae6c08c..b0fb7dcf8 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 4cbd80f0b..80a42e5da 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); } |