Commit 3c5ed2fe authored by Filippo Carone's avatar Filippo Carone

free callbacks on libvlc destruction

parent 2252bf63
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment