qml6: fix a leak of the wrapped QSGTextures

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6160>
This commit is contained in:
Matthew Waters 2024-02-07 15:04:53 +11:00 committed by Tim-Philipp Müller
parent 3e13fc4f88
commit 2dae3775d9

View file

@ -222,6 +222,10 @@ GstQSGTexture::GstQSGTexture(QRhiTexture * texture)
GstQSGTexture::~GstQSGTexture()
{
if (m_texture) {
delete m_texture;
m_texture = nullptr;
}
}
qint64
@ -291,6 +295,12 @@ GstQSGMaterialShader::GstQSGMaterialShader(GstVideoFormat v_format)
GstQSGMaterialShader::~GstQSGMaterialShader()
{
for (int i = 0; i < 4; i++) {
if (m_textures[i]) {
delete m_textures[i];
m_textures[i] = nullptr;
}
}
}
bool