if( !old.i_int == !cur.i_int )
return VLC_SUCCESS; /* nothing to do */
+ if( !var_InheritBool( obj, "playlist-cork" ) )
+ return VLC_SUCCESS;
+
if( cur.i_int )
{
- if( var_InheritBool( obj, "playlist-cork" ) )
- {
- msg_Dbg( obj, "corked" );
- playlist_Pause( pl );
- }
- else
- msg_Dbg( obj, "not corked" );
+ msg_Dbg( obj, "corked" );
+ playlist_Pause( pl );
}
else
+ {
msg_Dbg( obj, "uncorked" );
+ playlist_Resume( pl );
+ }
(void) var; (void) dummy;
return VLC_SUCCESS;
ml = NULL;
PL_UNLOCK;
- if( unlikely(root == NULL || playing == NULL || ml == NULL) )
+ if( unlikely(root == NULL || playing == NULL) )
abort();
p_playlist->p_root = root;
pl_priv(p_playlist)->status.p_item = NULL;
pl_priv(p_playlist)->status.p_node = p_playlist->p_playing;
pl_priv(p_playlist)->request.b_request = false;
- pl_priv(p_playlist)->status.i_status = PLAYLIST_STOPPED;
if (ml != NULL)
playlist_MLLoad( p_playlist );
int playlist_Status( playlist_t * p_playlist )
{
+ input_thread_t *p_input = pl_priv(p_playlist)->p_input;
+
PL_ASSERT_LOCKED;
- return pl_priv(p_playlist)->status.i_status;
+ if( p_input == NULL )
+ return PLAYLIST_STOPPED;
+ if( var_GetInteger( p_input, "state" ) == PAUSE_S )
+ return PLAYLIST_PAUSED;
+ return PLAYLIST_RUNNING;
}