From 16c3c8d5a171a07a385d1e4ed1282b4094fecd46 Mon Sep 17 00:00:00 2001 From: Cyril Deguet Date: Wed, 30 Jun 2004 18:07:34 +0000 Subject: [PATCH] * src/playlist/playlist.c: check "prevent-skip" to avoid skipping twice after a "goto" or a "skip" command. I don't know if it is the proper fix, but at least the playlist is useable now ;) --- src/playlist/playlist.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/playlist/playlist.c b/src/playlist/playlist.c index dd2487faf3..c0e6f00e04 100644 --- a/src/playlist/playlist.c +++ b/src/playlist/playlist.c @@ -239,6 +239,8 @@ void playlist_Command( playlist_t * p_playlist, playlist_command_t i_command, { input_StopThread( p_playlist->p_input ); } + val.b_bool = VLC_TRUE; + var_Set( p_playlist, "prevent-skip", val ); p_playlist->i_status = PLAYLIST_RUNNING; break; @@ -363,9 +365,16 @@ static void RunThread ( playlist_t *p_playlist ) p_playlist->i_status = PLAYLIST_RUNNING; } - /* Select the next playlist item */ + /* Select the next playlist item if necessary */ vlc_mutex_lock( &p_playlist->object_lock ); - SkipItem( p_playlist, 1 ); + var_Get( p_playlist, "prevent-skip", &val ); + if( val.b_bool == VLC_FALSE ) + { + SkipItem( p_playlist, 1 ); + } + /* Reset forced status */ + val.b_bool = VLC_FALSE; + var_Set( p_playlist, "prevent-skip", val ); vlc_mutex_unlock( &p_playlist->object_lock ); continue; -- GitLab