[vlc-devel] [PATCH 3/3] qt: release order in DComp compositor
Pierre Lamot
pierre at videolabs.io
Thu Oct 22 14:33:07 CEST 2020
---
modules/gui/qt/maininterface/compositor_dcomp.cpp | 2 +-
modules/gui/qt/maininterface/compositor_dcomp_uisurface.cpp | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/modules/gui/qt/maininterface/compositor_dcomp.cpp b/modules/gui/qt/maininterface/compositor_dcomp.cpp
index 361746027d..0738488dd3 100644
--- a/modules/gui/qt/maininterface/compositor_dcomp.cpp
+++ b/modules/gui/qt/maininterface/compositor_dcomp.cpp
@@ -271,7 +271,6 @@ void CompositorDirectComposition::destroyMainInterface()
m_uiVisual.Reset();
}
m_uiSurface.reset();
- m_ui.reset();
m_rootVisual.Reset();
m_dcompTarget.Reset();
m_qmlVideoSurfaceProvider.reset();
@@ -280,6 +279,7 @@ void CompositorDirectComposition::destroyMainInterface()
delete m_rootWindow;
m_rootWindow = nullptr;
}
+ m_ui.reset();
}
bool CompositorDirectComposition::setupVoutWindow(vout_window_t *p_wnd)
diff --git a/modules/gui/qt/maininterface/compositor_dcomp_uisurface.cpp b/modules/gui/qt/maininterface/compositor_dcomp_uisurface.cpp
index 74f90fbdff..25217019a0 100644
--- a/modules/gui/qt/maininterface/compositor_dcomp_uisurface.cpp
+++ b/modules/gui/qt/maininterface/compositor_dcomp_uisurface.cpp
@@ -232,6 +232,8 @@ bool CompositorDCompositionUISurface::init()
CompositorDCompositionUISurface::~CompositorDCompositionUISurface()
{
+ if (m_rootItem)
+ delete m_rootItem;
if (m_uiWindow)
delete m_uiWindow;
if (m_uiRenderControl)
@@ -240,8 +242,6 @@ CompositorDCompositionUISurface::~CompositorDCompositionUISurface()
delete m_uiOffscreenSurface;
if (m_context)
delete m_context;
- if (m_rootItem)
- delete m_rootItem;
if (m_qmlEngine)
delete m_qmlEngine;
releaseSharedTexture();
--
2.25.1
More information about the vlc-devel
mailing list