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
d0194a6f
Commit
d0194a6f
authored
Dec 22, 2017
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
decoder/Control: caller must lock mutex for Seek()
parent
e45d13d4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
2 deletions
+3
-2
DecoderControl.cxx
src/decoder/DecoderControl.cxx
+0
-2
DecoderControl.hxx
src/decoder/DecoderControl.hxx
+2
-0
Thread.cxx
src/player/Thread.cxx
+1
-0
No files found.
src/decoder/DecoderControl.cxx
View file @
d0194a6f
...
...
@@ -128,8 +128,6 @@ DecoderControl::Stop() noexcept
void
DecoderControl
::
Seek
(
SongTime
t
)
{
const
std
::
lock_guard
<
Mutex
>
protect
(
mutex
);
assert
(
state
!=
DecoderState
::
START
);
assert
(
state
!=
DecoderState
::
ERROR
);
...
...
src/decoder/DecoderControl.hxx
View file @
d0194a6f
...
...
@@ -387,6 +387,8 @@ public:
/**
* Throws #std::runtime_error on error.
*
* Caller must lock the object.
*/
void
Seek
(
SongTime
t
);
...
...
src/player/Thread.cxx
View file @
d0194a6f
...
...
@@ -628,6 +628,7 @@ Player::SeekDecoder() noexcept
try
{
const
PlayerControl
::
ScopeOccupied
occupied
(
pc
);
const
std
::
lock_guard
<
Mutex
>
lock
(
pc
.
mutex
);
dc
.
Seek
(
where
+
start_time
);
}
catch
(...)
{
/* decoder failure */
...
...
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