]> git.sesse.net Git - vlc/blobdiff - src/playlist/playlist.c
* 2nd review of /src/* \ libvlc.h (refs #438)
[vlc] / src / playlist / playlist.c
index 751e6f20e2cf14a073c473aec722f3170b96e3bc..c3195f4071c19c3070c2fa8674b82b8166369110 100644 (file)
@@ -5,7 +5,7 @@
  * $Id$
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
- *          Clément Stenac <zorglub@videolan.org>
+ *          Clément Stenac <zorglub@videolan.org>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -271,6 +271,9 @@ int playlist_Destroy( playlist_t * p_playlist )
         free( p_view );
     }
 
+    if( p_playlist->p_stats )
+        free( p_playlist->p_stats );
+
     vlc_mutex_destroy( &p_playlist->gc_lock );
     vlc_object_destroy( p_playlist->p_preparse );
     vlc_object_destroy( p_playlist );
@@ -556,7 +559,7 @@ static mtime_t ObjectGarbageCollector( playlist_t *p_playlist, int i_type,
             }
             if( i_type == VLC_OBJECT_VOUT )
             {
-                msg_Dbg( p_playlist, "garbage collector destroying 1 vout" );
+                msg_Dbg( p_playlist, "garbage collector destroys 1 vout" );
                 vlc_object_detach( p_obj );
                 vlc_object_release( p_obj );
                 vout_Destroy( (vout_thread_t *)p_obj );
@@ -595,9 +598,10 @@ static void RunThread ( playlist_t *p_playlist )
         i_loops++;
         if( p_playlist->p_interaction )
         {
-            stats_TimerStart( p_playlist, "Interaction thread" );
+            stats_TimerStart( p_playlist, "Interaction thread",
+                              STATS_TIMER_INTERACTION );
             intf_InteractionManage( p_playlist );
-            stats_TimerStop( p_playlist, "Interaction thread" );
+            stats_TimerStop( p_playlist, STATS_TIMER_INTERACTION );
         }
 
         if( i_loops %5 == 0 && p_playlist->p_stats )
@@ -709,9 +713,10 @@ static void RunThread ( playlist_t *p_playlist )
         {
             /* Start another input.
              * Get the next item to play */
-            stats_TimerStart( p_playlist, "Playlist walk" );
+            stats_TimerStart( p_playlist, "Playlist walk",
+                              STATS_TIMER_PLAYLIST_WALK );
             p_item = NextItem( p_playlist );
-            stats_TimerStop( p_playlist, "Playlist walk" );
+            stats_TimerStop( p_playlist, STATS_TIMER_PLAYLIST_WALK );
 
             /* We must stop */
             if( p_item == NULL )
@@ -873,9 +878,10 @@ static void RunPreparse ( playlist_preparse_t *p_obj )
                     strncmp( p_current->input.psz_uri, "dshow:", 6 ) )
                 {
                     b_preparsed = VLC_TRUE;
-                    stats_TimerStart( p_playlist, "Preparse run" );
+                    stats_TimerStart( p_playlist, "Preparse run",
+                                      STATS_TIMER_PREPARSE );
                     input_Preparse( p_playlist, &p_current->input );
-                    stats_TimerStop( p_playlist, "Preparse run" );
+                    stats_TimerStop( p_playlist, STATS_TIMER_PREPARSE );
                 }
                 vlc_mutex_unlock( &p_playlist->object_lock );
                 if( b_preparsed )