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
ea8ab4dd
Commit
ea8ab4dd
authored
Dec 22, 2017
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
player/Thread: merge two mutex locks
parent
4bcc38c7
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
Thread.cxx
src/player/Thread.cxx
+3
-3
No files found.
src/player/Thread.cxx
View file @
ea8ab4dd
...
@@ -610,6 +610,8 @@ Player::SeekDecoder() noexcept
...
@@ -610,6 +610,8 @@ Player::SeekDecoder() noexcept
ClearAndReplacePipe
(
dc
.
pipe
);
ClearAndReplacePipe
(
dc
.
pipe
);
}
}
const
std
::
lock_guard
<
Mutex
>
lock
(
pc
.
mutex
);
const
SongTime
start_time
=
pc
.
next_song
->
GetStartTime
();
const
SongTime
start_time
=
pc
.
next_song
->
GetStartTime
();
pc
.
next_song
.
reset
();
pc
.
next_song
.
reset
();
queued
=
false
;
queued
=
false
;
...
@@ -618,7 +620,7 @@ Player::SeekDecoder() noexcept
...
@@ -618,7 +620,7 @@ Player::SeekDecoder() noexcept
(just in case that happens to be still in
(just in case that happens to be still in
progress) */
progress) */
if
(
!
Lock
WaitDecoderStartup
())
if
(
!
WaitDecoderStartup
())
return
false
;
return
false
;
/* send the SEEK command */
/* send the SEEK command */
...
@@ -630,8 +632,6 @@ Player::SeekDecoder() noexcept
...
@@ -630,8 +632,6 @@ Player::SeekDecoder() noexcept
where
=
total_time
;
where
=
total_time
;
}
}
const
std
::
lock_guard
<
Mutex
>
lock
(
pc
.
mutex
);
try
{
try
{
const
PlayerControl
::
ScopeOccupied
occupied
(
pc
);
const
PlayerControl
::
ScopeOccupied
occupied
(
pc
);
...
...
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