Commit 43b06eed authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

playlist: use the new playlist_Pause() where appropriate

This fixes corking especially.
parent a437fe54
......@@ -215,14 +215,7 @@ DBUS_METHOD( Play )
DBUS_METHOD( Pause )
{
REPLY_INIT;
input_thread_t *p_input = pl_CurrentInput( p_this );
if( p_input && var_GetInteger(p_input, "state") == PLAYING_S )
playlist_TogglePause( PL );
if( p_input )
vlc_object_release( p_input );
playlist_Pause( PL );
REPLY_SEND;
}
......
......@@ -95,12 +95,7 @@ static VLCCoreInteraction *_o_sharedInstance = nil;
{
playlist_t *p_playlist = pl_Get(VLCIntf);
PL_LOCK;
bool b_playlist_playing = playlist_Status(p_playlist) == PLAYLIST_RUNNING;
PL_UNLOCK;
if (b_playlist_playing)
playlist_TogglePause(p_playlist);
playlist_Pause(p_playlist);
}
- (void)stop
......
......@@ -1129,10 +1129,7 @@ void MainInputManager::play()
void MainInputManager::pause()
{
if(p_input && PLAYING_S == var_GetInteger( p_input, "state" ) )
{
playlist_TogglePause( THEPL );
}
playlist_Pause( THEPL );
}
void MainInputManager::toggleRandom()
......
......@@ -89,7 +89,7 @@ static int CorksCallback( vlc_object_t *obj, char const *var,
if( var_InheritBool( obj, "playlist-cork" ) )
{
msg_Dbg( obj, "corked" );
playlist_TogglePause( pl );
playlist_Pause( pl );
}
else
msg_Dbg( obj, "not corked" );
......
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