]> git.sesse.net Git - vlc/blobdiff - modules/control/dbus.c
playlist_DeleteFromInput: pass the input item rather than its ID
[vlc] / modules / control / dbus.c
index c6c0fd9fbf35ac1b835f9a28e3b4495bdbf013eb..9aa7a9dadbd0635375aabbac29c695b5994f17e5 100644 (file)
@@ -514,7 +514,7 @@ DBUS_METHOD( DelTrack )
     if( i_position < p_playlist->current.i_size )
     {
         playlist_DeleteFromInput( p_playlist,
-            p_playlist->current.p_elems[i_position]->p_input->i_id,
+            p_playlist->current.p_elems[i_position]->p_input,
             pl_Locked );
     }
     PL_UNLOCK;
@@ -815,6 +815,12 @@ static void Close   ( vlc_object_t *p_this )
 
     dbus_connection_unref( p_intf->p_sys->p_conn );
 
+    // Free the events array
+    for( int i = 0; i < vlc_array_count( p_intf->p_sys->p_events ); i++ )
+    {
+        callback_info_t* info = vlc_array_item_at_index( p_intf->p_sys->p_events, i );
+        free( info );
+    }
     vlc_mutex_destroy( &p_intf->p_sys->lock );
     vlc_array_destroy( p_intf->p_sys->p_events );
     free( p_intf->p_sys );