1
mirror of https://code.videolan.org/videolan/vlc synced 2024-09-16 16:02:54 +02:00

Fix segfault when child vout creation fails

This commit is contained in:
Clément Stenac 2004-07-12 06:42:47 +00:00
parent fd59fcbf16
commit 707ee8ea31
8 changed files with 43 additions and 23 deletions

View File

@ -204,9 +204,12 @@ static void Destroy( vlc_object_t *p_this )
{
vout_thread_t *p_vout = (vout_thread_t *)p_this;
DEL_CALLBACKS( p_vout->p_sys->p_vout, SendEvents );
vlc_object_detach( p_vout->p_sys->p_vout );
vout_Destroy( p_vout->p_sys->p_vout );
if( p_vout->p_sys->p_vout )
{
DEL_CALLBACKS( p_vout->p_sys->p_vout, SendEvents );
vlc_object_detach( p_vout->p_sys->p_vout );
vout_Destroy( p_vout->p_sys->p_vout );
}
DEL_PARENT_CALLBACKS( SendEventsToChild );

View File

@ -287,9 +287,12 @@ static void Destroy( vlc_object_t *p_this )
{
vout_thread_t *p_vout = (vout_thread_t *)p_this;
DEL_CALLBACKS( p_vout->p_sys->p_vout, SendEvents );
vlc_object_detach( p_vout->p_sys->p_vout );
vout_Destroy( p_vout->p_sys->p_vout );
if( p_vout->p_sys->p_vout )
{
DEL_CALLBACKS( p_vout->p_sys->p_vout, SendEvents );
vlc_object_detach( p_vout->p_sys->p_vout );
vout_Destroy( p_vout->p_sys->p_vout );
}
DEL_PARENT_CALLBACKS( SendEventsToChild );

View File

@ -182,7 +182,6 @@ static int Init( vout_thread_t *p_vout )
if( p_vout->p_sys->p_vout == NULL )
{
msg_Err( p_vout, "cannot open vout, aborting" );
return VLC_EGENERIC;
}
@ -222,9 +221,12 @@ static void Destroy( vlc_object_t *p_this )
{
vout_thread_t *p_vout = (vout_thread_t *)p_this;
DEL_CALLBACKS( p_vout->p_sys->p_vout, SendEvents );
vlc_object_detach( p_vout->p_sys->p_vout );
vout_Destroy( p_vout->p_sys->p_vout );
if( p_vout->p_sys->p_vout )
{
DEL_CALLBACKS( p_vout->p_sys->p_vout, SendEvents );
vlc_object_detach( p_vout->p_sys->p_vout );
vout_Destroy( p_vout->p_sys->p_vout );
}
DEL_PARENT_CALLBACKS( SendEventsToChild );

View File

@ -2,7 +2,7 @@
* filter_common.h: Common filter functions
*****************************************************************************
* Copyright (C) 2001, 2002, 2003 VideoLAN
* $Id: filter_common.h,v 1.6 2004/02/22 15:57:41 fenrir Exp $
* $Id$
*
* Authors: Samuel Hocevar <sam@zoy.org>
*

View File

@ -165,9 +165,12 @@ static void Destroy( vlc_object_t *p_this )
{
vout_thread_t *p_vout = (vout_thread_t *)p_this;
DEL_CALLBACKS( p_vout->p_sys->p_vout, SendEvents );
vlc_object_detach( p_vout->p_sys->p_vout );
vout_Destroy( p_vout->p_sys->p_vout );
if( p_vout->p_sys->p_vout )
{
DEL_CALLBACKS( p_vout->p_sys->p_vout, SendEvents );
vlc_object_detach( p_vout->p_sys->p_vout );
vout_Destroy( p_vout->p_sys->p_vout );
}
DEL_PARENT_CALLBACKS( SendEventsToChild );

View File

@ -314,9 +314,12 @@ static void End( vout_thread_t *p_vout )
var_DelCallback( p_vout->p_sys->p_vout, "mouse-x", MouseEvent, p_vout);
var_DelCallback( p_vout->p_sys->p_vout, "mouse-y", MouseEvent, p_vout);
DEL_CALLBACKS( p_vout->p_sys->p_vout, SendEvents );
vlc_object_detach( p_vout->p_sys->p_vout );
vout_Destroy( p_vout->p_sys->p_vout );
if( p_vout->p_sys->p_vout )
{
DEL_CALLBACKS( p_vout->p_sys->p_vout, SendEvents );
vlc_object_detach( p_vout->p_sys->p_vout );
vout_Destroy( p_vout->p_sys->p_vout );
}
config_PutInt( p_vout, "logo-x", p_vout->p_sys->posx );
config_PutInt( p_vout, "logo-y", p_vout->p_sys->posy );

View File

@ -207,9 +207,12 @@ static void Destroy( vlc_object_t *p_this )
{
vout_thread_t *p_vout = (vout_thread_t *)p_this;
DEL_CALLBACKS( p_vout->p_sys->p_vout, SendEvents );
vlc_object_detach( p_vout->p_sys->p_vout );
vout_Destroy( p_vout->p_sys->p_vout );
if( p_vout->p_sys->p_vout )
{
DEL_CALLBACKS( p_vout->p_sys->p_vout, SendEvents );
vlc_object_detach( p_vout->p_sys->p_vout );
vout_Destroy( p_vout->p_sys->p_vout );
}
DEL_PARENT_CALLBACKS( SendEventsToChild );

View File

@ -245,9 +245,12 @@ static void Destroy( vlc_object_t *p_this )
{
vout_thread_t *p_vout = (vout_thread_t *)p_this;
DEL_CALLBACKS( p_vout->p_sys->p_vout, SendEvents );
vlc_object_detach( p_vout->p_sys->p_vout );
vout_Destroy( p_vout->p_sys->p_vout );
if( p_vout->p_sys->p_vout )
{
DEL_CALLBACKS( p_vout->p_sys->p_vout, SendEvents );
vlc_object_detach( p_vout->p_sys->p_vout );
vout_Destroy( p_vout->p_sys->p_vout );
}
DEL_PARENT_CALLBACKS( SendEventsToChild );