Commit 3fae03b3 authored by Laurent Aimar's avatar Laurent Aimar

Removed unused field and clean up (playlist).

parent 8a163fd8
...@@ -188,9 +188,8 @@ struct playlist_t ...@@ -188,9 +188,8 @@ struct playlist_t
/** Helper to add an item */ /** Helper to add an item */
struct playlist_add_t struct playlist_add_t
{ {
int i_node; int i_node; /**< Playist id of the parent node */
int i_item; int i_item; /**< Playist id of the playlist_item_t */
int i_position;
}; };
enum enum
......
...@@ -775,22 +775,21 @@ int playlist_TreeMove( playlist_t * p_playlist, playlist_item_t *p_item, ...@@ -775,22 +775,21 @@ int playlist_TreeMove( playlist_t * p_playlist, playlist_item_t *p_item,
void playlist_SendAddNotify( playlist_t *p_playlist, int i_item_id, void playlist_SendAddNotify( playlist_t *p_playlist, int i_item_id,
int i_node_id, bool b_signal ) int i_node_id, bool b_signal )
{ {
vlc_value_t val; playlist_private_t *p_sys = pl_priv(p_playlist);
PL_ASSERT_LOCKED; PL_ASSERT_LOCKED;
playlist_add_t *p_add = (playlist_add_t *)malloc( sizeof( playlist_add_t) ); p_sys->b_reset_currently_playing = true;
if( !p_add )
return;
p_add->i_item = i_item_id;
p_add->i_node = i_node_id;
val.p_address = p_add;
pl_priv(p_playlist)->b_reset_currently_playing = true;
if( b_signal ) if( b_signal )
vlc_cond_signal( &pl_priv(p_playlist)->signal ); vlc_cond_signal( &p_sys->signal );
playlist_add_t add;
add.i_item = i_item_id;
add.i_node = i_node_id;
vlc_value_t val;
val.p_address = &add;
var_Set( p_playlist, "playlist-item-append", val ); var_Set( p_playlist, "playlist-item-append", val );
free( p_add );
} }
/*************************************************************************** /***************************************************************************
...@@ -900,17 +899,10 @@ static int DeleteInner( playlist_t * p_playlist, playlist_item_t *p_item, ...@@ -900,17 +899,10 @@ static int DeleteInner( playlist_t * p_playlist, playlist_item_t *p_item,
ARRAY_REMOVE( p_playlist->items, i ); ARRAY_REMOVE( p_playlist->items, i );
/* Check if it is the current item */ /* Check if it is the current item */
if( get_current_status_item( p_playlist ) == p_item ) if( get_current_status_item( p_playlist ) == p_item && b_stop )
{ {
/* Hack we don't call playlist_Control for lock reasons */ playlist_Control( p_playlist, PLAYLIST_STOP, pl_Locked );
if( b_stop ) msg_Info( p_playlist, "stopping playback" );
{
pl_priv(p_playlist)->request.i_status = PLAYLIST_STOPPED;
pl_priv(p_playlist)->request.b_request = true;
pl_priv(p_playlist)->request.p_item = NULL;
msg_Info( p_playlist, "stopping playback" );
vlc_cond_signal( &pl_priv(p_playlist)->signal );
}
} }
PL_DEBUG( "deleting item `%s'", p_item->p_input->psz_name ); PL_DEBUG( "deleting item `%s'", p_item->p_input->psz_name );
......
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