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
451b142e
Commit
451b142e
authored
Nov 06, 2018
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
player/Thread: finish decoder startup before checking the buffer
This fixes a valgrind warning because `buffer_before_play` initialization needs to know the audio format from the decoder.
parent
28336252
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
Thread.cxx
src/player/Thread.cxx
+9
-9
No files found.
src/player/Thread.cxx
View file @
451b142e
...
@@ -970,6 +970,15 @@ Player::Run() noexcept
...
@@ -970,6 +970,15 @@ Player::Run() noexcept
pc
.
CommandFinished
();
pc
.
CommandFinished
();
while
(
ProcessCommand
())
{
while
(
ProcessCommand
())
{
if
(
decoder_starting
)
{
/* wait until the decoder is initialized completely */
if
(
!
CheckDecoderStartup
())
break
;
continue
;
}
if
(
buffering
)
{
if
(
buffering
)
{
/* buffering at the start of the song - wait
/* buffering at the start of the song - wait
until the buffer is large enough, to
until the buffer is large enough, to
...
@@ -987,15 +996,6 @@ Player::Run() noexcept
...
@@ -987,15 +996,6 @@ Player::Run() noexcept
}
}
}
}
if
(
decoder_starting
)
{
/* wait until the decoder is initialized completely */
if
(
!
CheckDecoderStartup
())
break
;
continue
;
}
if
(
dc
.
IsIdle
()
&&
queued
&&
dc
.
pipe
==
pipe
)
{
if
(
dc
.
IsIdle
()
&&
queued
&&
dc
.
pipe
==
pipe
)
{
/* the decoder has finished the current song;
/* the decoder has finished the current song;
make it decode the next song */
make it decode the next song */
...
...
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