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
b477f86c
Commit
b477f86c
authored
Nov 14, 2018
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
output/alsa: don't lock the mutex in CancelInternal()
CancelInternal() doesn't need to be protected because it is called synchronously from Cancel().
parent
020371f1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
AlsaOutputPlugin.cxx
src/output/plugins/AlsaOutputPlugin.cxx
+4
-4
No files found.
src/output/plugins/AlsaOutputPlugin.cxx
View file @
b477f86c
...
...
@@ -796,6 +796,9 @@ AlsaOutput::Drain()
inline
void
AlsaOutput
::
CancelInternal
()
noexcept
{
/* this method doesn't need to lock the mutex because while it
runs, the calling thread is blocked inside Cancel() */
must_prepare
=
true
;
snd_pcm_drop
(
pcm
);
...
...
@@ -804,10 +807,7 @@ AlsaOutput::CancelInternal() noexcept
period_buffer
.
Clear
();
ring_buffer
->
reset
();
{
const
std
::
lock_guard
<
Mutex
>
lock
(
mutex
);
active
=
false
;
}
active
=
false
;
MultiSocketMonitor
::
Reset
();
defer_invalidate_sockets
.
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