[vlc-commits] [Git][videolan/vlc][master] qt: set in DComp compositor in failed state after unloadGUI has been called
Felix Paul Kühne (@fkuehne)
gitlab at videolan.org
Wed Nov 19 18:35:18 UTC 2025
Felix Paul Kühne pushed to branch master at VideoLAN / VLC
Commits:
67deae26 by Pierre Lamot at 2025-11-19T19:14:17+01:00
qt: set in DComp compositor in failed state after unloadGUI has been called
we expect the compositor to not use mainCtx after unloadGUI has been called
https://code.videolan.org/videolan/vlc/-/tree/2101c1258b171a75178e19a3f8bc1c6bab4000cf/modules/gui/qt/qt.cpp#L1191
But the setup phase is triggered asynchronously once the first frame
renders. So we can skip the setup phase once in unloadGUI as we know we won't
show the UI
- - - - -
1 changed file:
- modules/gui/qt/maininterface/compositor_dcomp.cpp
Changes:
=====================================
modules/gui/qt/maininterface/compositor_dcomp.cpp
=====================================
@@ -164,6 +164,8 @@ bool CompositorDirectComposition::init()
void CompositorDirectComposition::setup()
{
+ //Setup shouldn't be called once we are shutting down
+ assert(m_mainCtx);
assert(m_quickView);
const auto rhi = m_quickView->rhi();
assert(rhi);
@@ -352,6 +354,16 @@ void CompositorDirectComposition::unloadGUI()
m_acrylicSurface.reset();
m_interfaceWindowHandler.reset();
+ {
+ QMutexLocker lock(&m_setupStateLock);
+ if (m_quickView) {
+ disconnect(m_quickView.get(), &QQuickWindow::frameSwapped,
+ this, &CompositorDirectComposition::setup);
+ }
+ m_setupState = SetupState::Fail;
+ m_setupStateCond.notify_all();
+ }
+
//at this point we need to unload the QML content but the window still need to
//be valid as it may still be used by the vout window.
//we cant' just delete the qmlEngine as the QmlView as the root item is parented to the QmlView
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/67deae26cf882567629385d8b4f57b6076ad4ed8
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/67deae26cf882567629385d8b4f57b6076ad4ed8
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list