mirror of
https://code.videolan.org/videolan/vlc
synced 2024-10-07 03:56:28 +02:00
playlist: use the new playlist_Pause() where appropriate
This fixes corking especially.
This commit is contained in:
parent
a437fe543c
commit
43b06eed8e
@ -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" );
|
||||
|
Loading…
Reference in New Issue
Block a user