[vlc-commits] playlist: remove stray code

Rémi Denis-Courmont git at videolan.org
Mon Nov 26 20:13:12 CET 2012


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon Nov 26 20:31:47 2012 +0200| [edd807d5194536d45bab3009332e4df03cc00f85] | committer: Rémi Denis-Courmont

playlist: remove stray code

Resetting the playing item only makes sense when there is no already
active input; NextItem() takes care of that from LoopRequest():

This code was redundant since the playlist was made tick-less (the
rebuild date check made no sense anymore).

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=edd807d5194536d45bab3009332e4df03cc00f85
---

 src/playlist/engine.c            |    1 -
 src/playlist/playlist_internal.h |    2 --
 src/playlist/thread.c            |    7 +------
 3 files changed, 1 insertion(+), 9 deletions(-)

diff --git a/src/playlist/engine.c b/src/playlist/engine.c
index aca7b59..42d554e 100644
--- a/src/playlist/engine.c
+++ b/src/playlist/engine.c
@@ -227,7 +227,6 @@ playlist_t * playlist_Create( vlc_object_t *p_parent )
 
     p_playlist->i_current_index = 0;
     pl_priv(p_playlist)->b_reset_currently_playing = true;
-    pl_priv(p_playlist)->last_rebuild_date = 0;
 
     pl_priv(p_playlist)->b_tree = var_InheritBool( p_parent, "playlist-tree" );
 
diff --git a/src/playlist/playlist_internal.h b/src/playlist/playlist_internal.h
index 7c78254..fedecea 100644
--- a/src/playlist/playlist_internal.h
+++ b/src/playlist/playlist_internal.h
@@ -90,8 +90,6 @@ typedef struct playlist_private_t
     bool     b_tree; /**< Display as a tree */
     bool     b_doing_ml; /**< Doing media library stuff  get quicker */
     bool     b_auto_preparse;
-    mtime_t  last_rebuild_date;
-
 } playlist_private_t;
 
 #define pl_priv( pl ) ((playlist_private_t *)(pl))
diff --git a/src/playlist/thread.c b/src/playlist/thread.c
index 1d5b65b..be293b1 100644
--- a/src/playlist/thread.c
+++ b/src/playlist/thread.c
@@ -562,14 +562,9 @@ static void *Thread ( void *data )
     playlist_Lock( p_playlist );
     while( !p_sys->killed || p_sys->p_input )
     {
-        /* FIXME: what's that ! */
-        if( p_sys->b_reset_currently_playing &&
-            mdate() - p_sys->last_rebuild_date > 30000 ) // 30 ms
-        {
+        if( p_sys->b_reset_currently_playing )
             ResetCurrentlyPlaying( p_playlist,
                                    get_current_status_item( p_playlist ) );
-            p_sys->last_rebuild_date = mdate();
-        }
 
         /* If there is an input, check that it doesn't need to die. */
         while( !LoopInput( p_playlist ) )



More information about the vlc-commits mailing list