qml6glsink: fix destruction of underlying texture

One should not directly delete the QRhiTexture instance.
Instead it should be marked as to be deleted once QRhi::endFrame()
is called (see: https://doc.qt.io/qt-6/qrhiresource.html#deleteLater )

Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3443
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6506>
This commit is contained in:
Robert Guziolowski 2024-03-28 09:46:08 +01:00 committed by GStreamer Marge Bot
parent b96072b810
commit 50bd2f2109

View file

@ -223,7 +223,7 @@ GstQSGTexture::GstQSGTexture(QRhiTexture * texture)
GstQSGTexture::~GstQSGTexture()
{
if (m_texture) {
delete m_texture;
m_texture->deleteLater();
m_texture = nullptr;
}
}