Commit 8375127e authored by Pierre d'Herbemont's avatar Pierre d'Herbemont

control/media_list.c: Init and free the flat media list.

parent 9dba5e18
...@@ -170,6 +170,9 @@ libvlc_media_list_new( libvlc_instance_t * p_inst, ...@@ -170,6 +170,9 @@ libvlc_media_list_new( libvlc_instance_t * p_inst,
p_mlist->p_libvlc_instance = p_inst; p_mlist->p_libvlc_instance = p_inst;
p_mlist->p_event_manager = libvlc_event_manager_new( p_mlist, p_inst, p_e ); p_mlist->p_event_manager = libvlc_event_manager_new( p_mlist, p_inst, p_e );
/* Code for that one should be handled in flat_media_list.c */
p_mlist->p_flat_mlist = NULL;
libvlc_event_manager_register_event_type( p_mlist->p_event_manager, libvlc_event_manager_register_event_type( p_mlist->p_event_manager,
libvlc_MediaListItemAdded, p_e ); libvlc_MediaListItemAdded, p_e );
libvlc_event_manager_register_event_type( p_mlist->p_event_manager, libvlc_event_manager_register_event_type( p_mlist->p_event_manager,
...@@ -213,6 +216,10 @@ void libvlc_media_list_release( libvlc_media_list_t * p_mlist ) ...@@ -213,6 +216,10 @@ void libvlc_media_list_release( libvlc_media_list_t * p_mlist )
/* Refcount null, time to free */ /* Refcount null, time to free */
/* Handled in flat_media_list.c */
if( p_mlist->p_flat_mlist )
libvlc_media_list_release( p_mlist->p_flat_mlist );
libvlc_event_manager_release( p_mlist->p_event_manager ); libvlc_event_manager_release( p_mlist->p_event_manager );
FOREACH_ARRAY( p_md, p_mlist->items ) FOREACH_ARRAY( p_md, p_mlist->items )
......
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