diff --git a/include/vlc/libvlc_structures.h b/include/vlc/libvlc_structures.h index eeafdb4adb..e9708112a2 100644 --- a/include/vlc/libvlc_structures.h +++ b/include/vlc/libvlc_structures.h @@ -32,6 +32,11 @@ extern "C" { /** This structure is opaque. It represents a libvlc instance */ typedef struct libvlc_instance_t libvlc_instance_t; + +/***************************************************************************** + * Exceptions + *****************************************************************************/ + /** defgroup libvlc_exception Exceptions * \ingroup libvlc * LibVLC Exceptions handling @@ -56,7 +61,6 @@ typedef struct * @{ */ - typedef struct { int i_id; char * psz_uri; diff --git a/src/control/core.c b/src/control/core.c index aacadf2092..401119a430 100644 --- a/src/control/core.c +++ b/src/control/core.c @@ -107,6 +107,15 @@ libvlc_instance_t * libvlc_new( int argc, char **argv, void libvlc_destroy( libvlc_instance_t *p_instance, libvlc_exception_t *p_e ) { + struct libvlc_callback_entry_list_t *p_listitem = p_instance->p_callback_list; + + while( p_listitem ) + { + struct libvlc_callback_entry_list *p_nextlistitem = p_listitem->next; + free( p_listitem ); + p_listitem = p_nextlistitem; + } + libvlc_InternalCleanup( p_instance->p_libvlc_int ); libvlc_InternalDestroy( p_instance->p_libvlc_int, VLC_FALSE ); } diff --git a/src/control/libvlc_internal.h b/src/control/libvlc_internal.h index afb949282b..41e7352ef9 100644 --- a/src/control/libvlc_internal.h +++ b/src/control/libvlc_internal.h @@ -70,7 +70,6 @@ struct libvlc_instance_t struct libvlc_callback_entry_list_t *p_callback_list; }; - struct libvlc_input_t { int i_input_id; ///< Input object id. We don't use a pointer to