]> git.sesse.net Git - vlc/blobdiff - src/libvlc.c
Remove uninitialized and unsynchronized global stats
[vlc] / src / libvlc.c
index fb7aa5257967965797b680513ca7e971eec2b113..1d1d71d7bbcfe1fc3c90e9b8d3bcf933bc08f616 100644 (file)
@@ -791,16 +791,6 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
     priv->i_timers = 0;
     priv->pp_timers = NULL;
 
-    /* Init stats */
-    p_libvlc->p_stats = (global_stats_t *)malloc( sizeof( global_stats_t ) );
-    if( !p_libvlc->p_stats )
-    {
-        vlc_object_release( p_libvlc );
-        return VLC_ENOMEM; /* FIXME: leaks */
-    }
-    vlc_mutex_init( &p_libvlc->p_stats->lock );
-    priv->p_stats_computer = NULL;
-
     priv->i_last_input_id = 0; /* Not very safe, should be removed */
 
     /*
@@ -1080,8 +1070,6 @@ void libvlc_InternalCleanup( libvlc_int_t *p_libvlc )
     stats_TimersCleanAll( p_libvlc );
 
     msg_Dbg( p_libvlc, "removing stats" );
-    vlc_mutex_destroy( &p_libvlc->p_stats->lock );
-    FREENULL( p_libvlc->p_stats );
 
 #ifndef WIN32
     char* psz_pidfile = NULL;