Commit 77fbb447 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

playlist: remove unsynchronized b_doing_ml

This could loose events and was theoretically undefined.
parent 0cf5d09c
......@@ -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,
......
......@@ -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 */
......
......@@ -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 );
......
......@@ -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))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment