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
546b773b
Commit
546b773b
authored
Aug 07, 2017
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
output/Internal: remove mutex code from Close()
parent
15dcaeda
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
4 deletions
+17
-4
Internal.cxx
src/output/Internal.cxx
+0
-2
Internal.hxx
src/output/Internal.hxx
+5
-0
Thread.cxx
src/output/Thread.cxx
+12
-2
No files found.
src/output/Internal.cxx
View file @
546b773b
...
...
@@ -108,8 +108,6 @@ AudioOutput::CloseFilter() noexcept
void
AudioOutput
::
Close
(
bool
drain
)
noexcept
{
const
ScopeUnlock
unlock
(
mutex
);
CloseOutput
(
drain
);
CloseFilter
();
...
...
src/output/Internal.hxx
View file @
546b773b
...
...
@@ -142,6 +142,11 @@ public:
void
Disable
()
noexcept
;
/**
* Invoke OutputPlugin::close().
*
* Caller must not lock the mutex.
*/
void
Close
(
bool
drain
)
noexcept
;
/**
...
...
src/output/Thread.cxx
View file @
546b773b
...
...
@@ -87,7 +87,12 @@ AudioOutputControl::InternalOpen2(const AudioFormat in_audio_format)
output
->
out_audio_format
);
}
catch
(
const
std
::
runtime_error
&
e
)
{
open
=
false
;
output
->
Close
(
false
);
{
const
ScopeUnlock
unlock
(
mutex
);
output
->
Close
(
false
);
}
std
::
throw_with_nested
(
FormatRuntimeError
(
"Failed to convert for
\"
%s
\"
[%s]"
,
GetName
(),
output
->
plugin
.
name
));
}
...
...
@@ -194,7 +199,12 @@ AudioOutputControl::InternalClose(bool drain) noexcept
assert
(
IsOpen
());
open
=
false
;
output
->
Close
(
drain
);
{
const
ScopeUnlock
unlock
(
mutex
);
output
->
Close
(
drain
);
}
source
.
Close
();
}
...
...
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