Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
442b3275
Commit
442b3275
authored
Jun 19, 2010
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
playlist: protect acess to player state in playlist_sync()
parent
cff72764
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
playlist.c
src/playlist.c
+7
-2
No files found.
src/playlist.c
View file @
442b3275
...
...
@@ -219,7 +219,12 @@ playlist_sync(struct playlist *playlist)
playing anymore; ignore the event */
return
;
if
(
pc_get_state
()
==
PLAYER_STATE_STOP
)
player_lock
();
enum
player_state
pc_state
=
pc_get_state
();
const
struct
song
*
pc_next_song
=
pc
.
next_song
;
player_unlock
();
if
(
pc_state
==
PLAYER_STATE_STOP
)
/* the player thread has stopped: check if playback
should be restarted with the next song. That can
happen if the playlist isn't filling the queue fast
...
...
@@ -228,7 +233,7 @@ playlist_sync(struct playlist *playlist)
else
{
/* check if the player thread has already started
playing the queued song */
if
(
pc
.
next_song
==
NULL
&&
playlist
->
queued
!=
-
1
)
if
(
pc
_
next_song
==
NULL
&&
playlist
->
queued
!=
-
1
)
playlist_song_started
(
playlist
);
/* make sure the queued song is always set (if
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment