Commit c5687ade authored by Laurent Aimar's avatar Laurent Aimar

Cosmetics.

parent 567a3b09
......@@ -98,7 +98,6 @@ int playlist_Control( playlist_t * p_playlist, int i_query,
static int PlaylistVAControl( playlist_t * p_playlist, int i_query, va_list args )
{
playlist_item_t *p_item, *p_node;
vlc_value_t val;
PL_ASSERT_LOCKED;
......@@ -138,8 +137,7 @@ static int PlaylistVAControl( playlist_t * p_playlist, int i_query, va_list args
case PLAYLIST_PLAY:
if( pl_priv(p_playlist)->p_input )
{
val.i_int = PLAYING_S;
var_Set( pl_priv(p_playlist)->p_input, "state", val );
var_SetInteger( pl_priv(p_playlist)->p_input, "state", PLAYING_S );
break;
}
else
......@@ -153,17 +151,13 @@ static int PlaylistVAControl( playlist_t * p_playlist, int i_query, va_list args
break;
case PLAYLIST_PAUSE:
val.i_int = 0;
if( pl_priv(p_playlist)->p_input )
var_Get( pl_priv(p_playlist)->p_input, "state", &val );
if( val.i_int == PAUSE_S )
if( pl_priv(p_playlist)->p_input &&
var_GetInteger( pl_priv(p_playlist)->p_input, "state" ) == PAUSE_S )
{
pl_priv(p_playlist)->status.i_status = PLAYLIST_RUNNING;
if( pl_priv(p_playlist)->p_input )
{
val.i_int = PLAYING_S;
var_Set( pl_priv(p_playlist)->p_input, "state", val );
var_SetInteger( pl_priv(p_playlist)->p_input, "state", PLAYING_S );
}
}
else
......@@ -171,8 +165,7 @@ static int PlaylistVAControl( playlist_t * p_playlist, int i_query, va_list args
pl_priv(p_playlist)->status.i_status = PLAYLIST_PAUSED;
if( pl_priv(p_playlist)->p_input )
{
val.i_int = PAUSE_S;
var_Set( pl_priv(p_playlist)->p_input, "state", val );
var_SetInteger( pl_priv(p_playlist)->p_input, "state", PAUSE_S );
}
}
break;
......
......@@ -266,25 +266,20 @@ void set_current_status_node( playlist_t * p_playlist,
static void VariablesInit( playlist_t *p_playlist )
{
vlc_value_t val;
/* These variables control updates */
var_Create( p_playlist, "intf-change", VLC_VAR_BOOL );
val.b_bool = true;
var_Set( p_playlist, "intf-change", val );
var_SetBool( p_playlist, "intf-change", true );
var_Create( p_playlist, "item-change", VLC_VAR_INTEGER );
val.i_int = -1;
var_Set( p_playlist, "item-change", val );
var_SetInteger( p_playlist, "item-change", -1 );
var_Create( p_playlist, "item-deleted", VLC_VAR_INTEGER );
val.i_int = -1;
var_Set( p_playlist, "item-deleted", val );
var_SetInteger( p_playlist, "item-deleted", -1 );
var_Create( p_playlist, "item-append", VLC_VAR_ADDRESS );
var_Create( p_playlist, "playlist-current", VLC_VAR_INTEGER );
val.i_int = -1;
var_Set( p_playlist, "playlist-current", val );
var_SetInteger( p_playlist, "playlist-current", -1 );
var_Create( p_playlist, "activity", VLC_VAR_INTEGER );
var_SetInteger( p_playlist, "activity", 0 );
......
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