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
d8c5a63b
Commit
d8c5a63b
authored
Sep 26, 2013
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PlayerThread: unlock/lock in player_task()
parent
bcb2db62
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
8 deletions
+3
-8
PlayerThread.cxx
src/PlayerThread.cxx
+3
-8
No files found.
src/PlayerThread.cxx
View file @
d8c5a63b
...
@@ -912,8 +912,6 @@ player::SongBorder()
...
@@ -912,8 +912,6 @@ player::SongBorder()
inline
void
inline
void
player
::
Run
()
player
::
Run
()
{
{
pc
.
Unlock
();
pipe
=
new
MusicPipe
();
pipe
=
new
MusicPipe
();
StartDecoder
(
*
pipe
);
StartDecoder
(
*
pipe
);
...
@@ -923,8 +921,6 @@ player::Run()
...
@@ -923,8 +921,6 @@ player::Run()
StopDecoder
();
StopDecoder
();
player_command_finished
(
pc
);
player_command_finished
(
pc
);
delete
pipe
;
delete
pipe
;
GlobalEvents
::
Emit
(
GlobalEvents
::
PLAYLIST
);
pc
.
Lock
();
return
;
return
;
}
}
...
@@ -1095,10 +1091,6 @@ player::Run()
...
@@ -1095,10 +1091,6 @@ player::Run()
pc
.
state
=
PLAYER_STATE_STOP
;
pc
.
state
=
PLAYER_STATE_STOP
;
pc
.
Unlock
();
pc
.
Unlock
();
GlobalEvents
::
Emit
(
GlobalEvents
::
PLAYLIST
);
pc
.
Lock
();
}
}
static
void
static
void
...
@@ -1127,7 +1119,10 @@ player_task(gpointer arg)
...
@@ -1127,7 +1119,10 @@ player_task(gpointer arg)
case
PLAYER_COMMAND_QUEUE
:
case
PLAYER_COMMAND_QUEUE
:
assert
(
pc
.
next_song
!=
NULL
);
assert
(
pc
.
next_song
!=
NULL
);
pc
.
Unlock
();
do_play
(
pc
,
dc
,
buffer
);
do_play
(
pc
,
dc
,
buffer
);
GlobalEvents
::
Emit
(
GlobalEvents
::
PLAYLIST
);
pc
.
Lock
();
break
;
break
;
case
PLAYER_COMMAND_STOP
:
case
PLAYER_COMMAND_STOP
:
...
...
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