[vlc-commits] playlist: remove unsynchronized b_doing_ml

Rémi Denis-Courmont git at videolan.org
Sat Nov 15 11:21:14 CET 2014


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Nov 15 12:20:38 2014 +0200| [77fbb447118ea09d52a4cad999e05052d19d316d] | committer: Rémi Denis-Courmont

playlist: remove unsynchronized b_doing_ml

This could loose events and was theoretically undefined.

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

 src/playlist/engine.c            |    2 --
 src/playlist/item.c              |    9 ++-------
 src/playlist/loadsave.c          |    6 ------
 src/playlist/playlist_internal.h |    1 -
 4 files changed, 2 insertions(+), 16 deletions(-)

diff --git a/src/playlist/engine.c b/src/playlist/engine.c
index ca342a9..00bfb61 100644
--- a/src/playlist/engine.c
+++ b/src/playlist/engine.c
@@ -229,8 +229,6 @@ playlist_t *playlist_Create( vlc_object_t *p_parent )
 
     pl_priv(p_playlist)->b_tree = var_InheritBool( p_parent, "playlist-tree" );
 
-    pl_priv(p_playlist)->b_doing_ml = false;
-
     /* Create the root node */
     PL_LOCK;
     p_playlist->p_root = playlist_NodeCreate( p_playlist, NULL, NULL,
diff --git a/src/playlist/item.c b/src/playlist/item.c
index eafc79e..e51637f 100644
--- a/src/playlist/item.c
+++ b/src/playlist/item.c
@@ -450,10 +450,6 @@ int playlist_AddInput( playlist_t* p_playlist, input_item_t *p_input,
 {
     playlist_item_t *p_item;
 
-    if( !pl_priv(p_playlist)->b_doing_ml )
-        PL_DEBUG( "adding item `%s' ( %s )", p_input->psz_name,
-                                             p_input->psz_uri );
-
     PL_LOCK_IF( !b_locked );
 
     p_item = playlist_ItemNewFromInput( p_playlist, p_input );
@@ -788,9 +784,8 @@ static void AddItem( playlist_t *p_playlist, playlist_item_t *p_item,
     else
         playlist_NodeInsert( p_playlist, p_item, p_node, i_pos );
 
-    if( !pl_priv(p_playlist)->b_doing_ml )
-        playlist_SendAddNotify( p_playlist, p_item->i_id, p_node->i_id,
-                                 !( i_mode & PLAYLIST_NO_REBUILD ) );
+    playlist_SendAddNotify( p_playlist, p_item->i_id, p_node->i_id,
+                            !( i_mode & PLAYLIST_NO_REBUILD ) );
 }
 
 /* Actually convert an item to a node */
diff --git a/src/playlist/loadsave.c b/src/playlist/loadsave.c
index 605059f..9215e2a 100644
--- a/src/playlist/loadsave.c
+++ b/src/playlist/loadsave.c
@@ -170,16 +170,10 @@ int playlist_MLLoad( playlist_t *p_playlist )
 
     vlc_event_attach( &p_input->event_manager, vlc_InputItemSubItemTreeAdded,
                         input_item_subitem_tree_added, p_playlist );
-
-    pl_priv(p_playlist)->b_doing_ml = true;
     PL_UNLOCK;
 
     input_Read( p_playlist, p_input );
 
-    PL_LOCK;
-    pl_priv(p_playlist)->b_doing_ml = false;
-    PL_UNLOCK;
-
     vlc_event_detach( &p_input->event_manager, vlc_InputItemSubItemTreeAdded,
                         input_item_subitem_tree_added, p_playlist );
 
diff --git a/src/playlist/playlist_internal.h b/src/playlist/playlist_internal.h
index 51a3748..ee8f632 100644
--- a/src/playlist/playlist_internal.h
+++ b/src/playlist/playlist_internal.h
@@ -89,7 +89,6 @@ typedef struct playlist_private_t
     bool     b_reset_currently_playing; /** Reset current item array */
 
     bool     b_tree; /**< Display as a tree */
-    bool     b_doing_ml; /**< Doing media library stuff  get quicker */
 } playlist_private_t;
 
 #define pl_priv( pl ) ((playlist_private_t *)(pl))



More information about the vlc-commits mailing list