mirror of https://code.videolan.org/videolan/vlc
free callbacks on libvlc destruction
This commit is contained in:
parent
2252bf6341
commit
3c5ed2fe48
|
@ -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;
|
||||
|
|
|
@ -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 );
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue