[vlc-commits] skins2: temporary fix for a design issue
Erwan Tulou
git at videolan.org
Sat Jul 6 19:15:55 CEST 2019
vlc | branch: master | Erwan Tulou <erwan10 at videolan.org> | Thu Jul 4 01:16:52 2019 +0200| [04409ebd456c67bfe4f5827c2116359f955b596e] | committer: Erwan Tulou
skins2: temporary fix for a design issue
Interface modules also often acting as vout window submodules should
outlive any vout instances in order to ensure proper termination of the
latter.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=04409ebd456c67bfe4f5827c2116359f955b596e
---
modules/gui/skins2/src/skin_main.cpp | 17 +++++++++++++++--
1 file changed, 15 insertions(+), 2 deletions(-)
diff --git a/modules/gui/skins2/src/skin_main.cpp b/modules/gui/skins2/src/skin_main.cpp
index 49793f86e6..40f5bf6ee7 100644
--- a/modules/gui/skins2/src/skin_main.cpp
+++ b/modules/gui/skins2/src/skin_main.cpp
@@ -366,8 +366,21 @@ static int WindowEnable( vout_window_t *pWnd, const vout_window_cfg_t *cfg )
static void WindowDisable( vout_window_t *pWnd )
{
- vout_window_skins_t* sys = (vout_window_skins_t *)pWnd->sys;
- intf_thread_t *pIntf = sys->pIntf;
+ // vout_window_skins_t* sys = (vout_window_skins_t *)pWnd->sys;
+
+ // Design issue
+ // In the process of quitting vlc, the interfaces are destroyed first,
+ // then comes the playlist along with the player and possible vouts.
+ // problem: the interface is no longer active to properly deallocate
+ // ressources allocated as a vout window submodule.
+ vlc_mutex_lock( &skin_load.mutex );
+ intf_thread_t *pIntf = skin_load.intf;
+ vlc_mutex_unlock( &skin_load.mutex );
+ if( pIntf == NULL )
+ {
+ msg_Err( pWnd, "Design issue: the interface no longer exists !!!!" );
+ return;
+ }
// force execution in the skins2 thread context
CmdExecuteBlock* cmd = new CmdExecuteBlock( pIntf, VLC_OBJECT( pWnd ),
More information about the vlc-commits
mailing list