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
910496ce
Commit
910496ce
authored
Dec 22, 2017
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
decoder/Control: caller must lock mutex for Start()
parent
739e1da2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
7 deletions
+6
-7
DecoderControl.cxx
src/decoder/DecoderControl.cxx
+0
-2
DecoderControl.hxx
src/decoder/DecoderControl.hxx
+2
-0
Thread.cxx
src/player/Thread.cxx
+4
-5
No files found.
src/decoder/DecoderControl.cxx
View file @
910496ce
...
...
@@ -94,8 +94,6 @@ DecoderControl::Start(std::unique_ptr<DetachedSong> _song,
SongTime
_start_time
,
SongTime
_end_time
,
MusicBuffer
&
_buffer
,
MusicPipe
&
_pipe
)
noexcept
{
const
std
::
lock_guard
<
Mutex
>
protect
(
mutex
);
assert
(
_song
!=
nullptr
);
assert
(
_pipe
.
IsEmpty
());
...
...
src/decoder/DecoderControl.hxx
View file @
910496ce
...
...
@@ -372,6 +372,8 @@ public:
/**
* Start the decoder.
*
* Caller must lock the object.
*
* @param song the song to be decoded; the given instance will be
* owned and freed by the decoder
* @param start_time see #DecoderControl
...
...
src/player/Thread.cxx
View file @
910496ce
...
...
@@ -361,11 +361,10 @@ Player::StartDecoder(MusicPipe &_pipe) noexcept
assert
(
queued
||
pc
.
command
==
PlayerCommand
::
SEEK
);
assert
(
pc
.
next_song
!=
nullptr
);
{
/* copy ReplayGain parameters to the decoder */
const
std
::
lock_guard
<
Mutex
>
protect
(
pc
.
mutex
);
dc
.
replay_gain_mode
=
pc
.
replay_gain_mode
;
}
const
std
::
lock_guard
<
Mutex
>
protect
(
pc
.
mutex
);
/* copy ReplayGain parameters to the decoder */
dc
.
replay_gain_mode
=
pc
.
replay_gain_mode
;
SongTime
start_time
=
pc
.
next_song
->
GetStartTime
()
+
pc
.
seek_time
;
...
...
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