Commit 8fed9f21 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

playlist: remove request.i_status

parent 52260420
......@@ -60,9 +60,9 @@ static void playlist_vaControl( playlist_t *p_playlist, int i_query, va_list arg
switch( i_query )
{
case PLAYLIST_STOP:
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;
pl_priv(p_playlist)->request.p_node = NULL;
break;
// Node can be null, it will keep the same. Use with care ...
......@@ -77,7 +77,6 @@ static void playlist_vaControl( playlist_t *p_playlist, int i_query, va_list arg
p_node = get_current_status_node( p_playlist );
assert( p_node );
}
pl_priv(p_playlist)->request.i_status = PLAYLIST_RUNNING;
pl_priv(p_playlist)->request.i_skip = 0;
pl_priv(p_playlist)->request.b_request = true;
pl_priv(p_playlist)->request.p_node = p_node;
......@@ -96,7 +95,6 @@ static void playlist_vaControl( playlist_t *p_playlist, int i_query, va_list arg
}
else
{
pl_priv(p_playlist)->request.i_status = PLAYLIST_RUNNING;
pl_priv(p_playlist)->request.b_request = true;
pl_priv(p_playlist)->request.p_node = get_current_status_node( p_playlist );
pl_priv(p_playlist)->request.p_item = get_current_status_item( p_playlist );
......@@ -128,9 +126,6 @@ static void playlist_vaControl( playlist_t *p_playlist, int i_query, va_list arg
pl_priv(p_playlist)->request.p_node = get_current_status_node( p_playlist );
pl_priv(p_playlist)->request.p_item = get_current_status_item( p_playlist );
pl_priv(p_playlist)->request.i_skip = (int) va_arg( args, int );
/* if already running, keep running */
if( pl_priv(p_playlist)->status.i_status != PLAYLIST_STOPPED )
pl_priv(p_playlist)->request.i_status = pl_priv(p_playlist)->status.i_status;
pl_priv(p_playlist)->request.b_request = true;
break;
}
......
......@@ -756,7 +756,6 @@ static void GoAndPreparse( playlist_t *p_playlist, int i_mode,
sys->request.p_item = p_item;
if( sys->p_input != NULL )
input_Stop( sys->p_input, true );
sys->request.i_status = PLAYLIST_RUNNING;
vlc_cond_signal( &sys->signal );
}
/* Preparse if no artist/album info, and hasn't been preparsed allready
......
......@@ -68,7 +68,6 @@ typedef struct playlist_private_t
struct {
/* Request. Use this to give orders to the playlist main loop */
playlist_status_t i_status; /**< requested playlist status */
playlist_item_t * p_node; /**< requested node to play from */
playlist_item_t * p_item; /**< requested item to play in the node */
......
......@@ -523,8 +523,10 @@ static void *Thread ( void *data )
if( p_sys->killed )
break; /* THE END */
const int status = p_sys->request.b_request ?
p_sys->request.i_status : p_sys->status.i_status;
int status = p_sys->status.i_status;
if( p_sys->request.b_request )
status = (p_sys->request.p_item || p_sys->request.p_node)
? PLAYLIST_RUNNING : PLAYLIST_STOPPED;
/* Destroy any video display if the playlist is supposed to stop */
if( status == PLAYLIST_STOPPED
......
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