mirror of
https://code.videolan.org/videolan/vlc
synced 2024-07-29 11:58:24 +02:00
* ./src/libvlc.c: fixed a segfault on exit, libvlc needs to be
detached before being destroyed.
This commit is contained in:
parent
6d68e3437f
commit
792640357c
11
src/libvlc.c
11
src/libvlc.c
@ -2,7 +2,7 @@
|
||||
* libvlc.c: main libvlc source
|
||||
*****************************************************************************
|
||||
* Copyright (C) 1998-2002 VideoLAN
|
||||
* $Id: libvlc.c,v 1.60 2003/01/31 13:52:26 sam Exp $
|
||||
* $Id: libvlc.c,v 1.61 2003/02/01 18:53:03 sam Exp $
|
||||
*
|
||||
* Authors: Vincent Seguin <seguin@via.ecp.fr>
|
||||
* Samuel Hocevar <sam@zoy.org>
|
||||
@ -515,6 +515,11 @@ int VLC_Init( int i_object, int i_argc, char *ppsz_argv[] )
|
||||
free( psz_modules );
|
||||
}
|
||||
|
||||
/*
|
||||
* FIXME: kludge to use a p_vlc-local variable for the Mozilla plugin
|
||||
*/
|
||||
var_Create( p_vlc, "drawable", VLC_VAR_INTEGER );
|
||||
|
||||
/*
|
||||
* Get input filenames given as commandline arguments
|
||||
*/
|
||||
@ -641,12 +646,14 @@ int VLC_Destroy( int i_object )
|
||||
|
||||
vlc_object_detach( p_vlc );
|
||||
|
||||
/* Release object before destroying it */
|
||||
if( i_object ) vlc_object_release( p_vlc );
|
||||
|
||||
vlc_object_destroy( p_vlc );
|
||||
|
||||
/* Stop thread system: last one out please shut the door! */
|
||||
vlc_threads_end( &libvlc );
|
||||
|
||||
if( i_object ) vlc_object_release( p_vlc );
|
||||
return VLC_SUCCESS;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user