playlist: use the new playlist_Pause() where appropriate

This fixes corking especially.
This commit is contained in:
Rémi Denis-Courmont 2014-12-15 19:22:46 +02:00
parent a437fe543c
commit 43b06eed8e
4 changed files with 4 additions and 19 deletions

View File

@ -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;
}

View File

@ -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

View File

@ -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()

View File

@ -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" );