1
mirror of https://code.videolan.org/videolan/vlc synced 2024-10-07 03:56:28 +02:00

* modules/video_output/x11/xcommon.c, modules/gui/wxwidgets/video.cpp, modules/gui/skins2/src/vlcproc.cpp: fixed crash on exit, introduced in changelist 16148 (unix VOUT_REPARENT).

This commit is contained in:
Gildas Bazin 2006-08-15 22:10:37 +00:00
parent 386742db4a
commit fa2bb4e2f0
3 changed files with 9 additions and 10 deletions

View File

@ -204,7 +204,7 @@ void VlcProc::registerVoutWindow( void *pVoutWindow )
// Reparent the vout window
if( m_pVout )
{
if( vout_Control( m_pVout, VOUT_REPARENT ) != VLC_SUCCESS )
if( vout_Control( m_pVout, VOUT_REPARENT, 0 ) != VLC_SUCCESS )
vout_Control( m_pVout, VOUT_CLOSE );
}
}
@ -220,7 +220,7 @@ void VlcProc::dropVout()
{
if( m_pVout )
{
if( vout_Control( m_pVout, VOUT_REPARENT ) != VLC_SUCCESS )
if( vout_Control( m_pVout, VOUT_REPARENT, 0 ) != VLC_SUCCESS )
vout_Control( m_pVout, VOUT_CLOSE );
m_pVout = NULL;
}

View File

@ -154,11 +154,11 @@ VideoWindow::~VideoWindow()
if( !p_intf->psz_switch_intf )
{
if( vout_Control( p_vout, VOUT_CLOSE ) != VLC_SUCCESS )
vout_Control( p_vout, VOUT_REPARENT );
vout_Control( p_vout, VOUT_REPARENT, 0 );
}
else
{
if( vout_Control( p_vout, VOUT_REPARENT ) != VLC_SUCCESS )
if( vout_Control( p_vout, VOUT_REPARENT, 0 ) != VLC_SUCCESS )
vout_Control( p_vout, VOUT_CLOSE );
}
}

View File

@ -2346,7 +2346,7 @@ static int Control( vout_thread_t *p_vout, int i_query, va_list args )
vlc_bool_t b_arg;
unsigned int i_width, i_height;
unsigned int *pi_width, *pi_height;
Drawable d;
Drawable d = 0;
switch( i_query )
{
@ -2393,17 +2393,16 @@ static int Control( vout_thread_t *p_vout, int i_query, va_list args )
case VOUT_REPARENT:
vlc_mutex_lock( &p_vout->p_sys->lock );
d = (Drawable)va_arg( args, int );
if ( !d )
if( i_query == VOUT_REPARENT ) d = (Drawable)va_arg( args, int );
if( !d )
XReparentWindow( p_vout->p_sys->p_display,
p_vout->p_sys->original_window.base_window,
DefaultRootWindow( p_vout->p_sys->p_display ),
0, 0 );
else
else
XReparentWindow( p_vout->p_sys->p_display,
p_vout->p_sys->original_window.base_window,
d,
0, 0);
d, 0, 0);
XSync( p_vout->p_sys->p_display, False );
p_vout->p_sys->original_window.owner_window = 0;
vlc_mutex_unlock( &p_vout->p_sys->lock );