mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 02:01:12 +00:00
qml6: fix a leak of the wrapped QSGTextures
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6160>
This commit is contained in:
parent
3e13fc4f88
commit
2dae3775d9
1 changed files with 10 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue