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
3b2b5edd
Commit
3b2b5edd
authored
Dec 22, 2017
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
player/Thread: move mutex lock out of SeekDecoder()
parent
5bd1fbb0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
8 deletions
+6
-8
Thread.cxx
src/player/Thread.cxx
+6
-8
No files found.
src/player/Thread.cxx
View file @
3b2b5edd
...
...
@@ -274,7 +274,7 @@ private:
/**
* This is the handler for the #PlayerCommand::SEEK command.
*
*
The player lock is not held
.
*
Caller must lock the mutex
.
*
* @return false if the decoder has failed
*/
...
...
@@ -613,9 +613,10 @@ Player::SeekDecoder() noexcept
{
assert
(
pc
.
next_song
!=
nullptr
);
pc
.
outputs
.
Cancel
();
const
std
::
lock_guard
<
Mutex
>
lock
(
pc
.
mutex
);
{
const
ScopeUnlock
unlock
(
pc
.
mutex
);
pc
.
outputs
.
Cancel
();
}
if
(
!
dc
.
IsCurrentSong
(
*
pc
.
next_song
))
{
/* the decoder is already decoding the "next" song -
...
...
@@ -717,10 +718,7 @@ Player::ProcessCommand() noexcept
break
;
case
PlayerCommand
:
:
SEEK
:
{
const
ScopeUnlock
unlock
(
pc
.
mutex
);
SeekDecoder
();
}
SeekDecoder
();
break
;
case
PlayerCommand
:
:
CANCEL
:
...
...
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