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
fa2b59df
Commit
fa2b59df
authored
May 15, 2017
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Main: cap buffer_before_play at 80% to prevent deadlock
Closes #34
parent
f41a1694
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
0 deletions
+14
-0
NEWS
NEWS
+1
-0
Main.cxx
src/Main.cxx
+13
-0
No files found.
NEWS
View file @
fa2b59df
...
...
@@ -2,6 +2,7 @@ ver 0.20.7 (not yet released)
* database
- simple: fix false positive directory loop detection with NFS
* enforce a reasonable minimum audio_buffer_size setting
* cap buffer_before_play at 80% to prevent deadlock
* fix random crashes when compiled with clang
ver 0.20.6 (2017/03/10)
...
...
src/Main.cxx
View file @
fa2b59df
...
...
@@ -340,6 +340,19 @@ initialize_decoder_and_player(const ReplayGainConfig &replay_gain_config)
"than 100 percent, line %i"
,
param
->
value
.
c_str
(),
param
->
line
);
}
if
(
perc
>
80
)
{
/* this upper limit should avoid deadlocks
which can occur because the DecoderThread
cannot ever fill the music buffer to
exactly 100%; a few chunks always need to
be available to generate silence in
Player::SendSilence() */
FormatError
(
config_domain
,
"buffer_before_play is too large (%f%%), capping at 80%%; please fix your configuration"
,
perc
);
perc
=
80
;
}
}
else
perc
=
DEFAULT_BUFFER_BEFORE_PLAY
;
...
...
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