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
d4ee1652
Commit
d4ee1652
authored
Aug 07, 2017
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
output/Thread: move OpenSoftwareMixer() to the end
This call cannot fail, but needs cleanup if others fail. By moving it to the end, we eliminate some cleanup.
parent
4f7f577a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
8 deletions
+7
-8
Thread.cxx
src/output/Thread.cxx
+7
-8
No files found.
src/output/Thread.cxx
View file @
d4ee1652
...
...
@@ -52,8 +52,6 @@ AudioOutputControl::InternalOpen2(const AudioFormat in_audio_format)
{
assert
(
in_audio_format
.
IsValid
());
output
->
OpenSoftwareMixer
();
const
auto
cf
=
in_audio_format
.
WithMask
(
output
->
config_audio_format
);
if
(
open
&&
cf
!=
output
->
filter_audio_format
)
...
...
@@ -64,13 +62,9 @@ AudioOutputControl::InternalOpen2(const AudioFormat in_audio_format)
output
->
filter_audio_format
=
cf
;
if
(
!
open
)
{
try
{
{
const
ScopeUnlock
unlock
(
mutex
);
output
->
OpenOutputAndConvert
(
output
->
filter_audio_format
);
}
catch
(...)
{
const
ScopeUnlock
unlock
(
mutex
);
output
->
CloseSoftwareMixer
();
throw
;
}
open
=
true
;
...
...
@@ -86,13 +80,18 @@ AudioOutputControl::InternalOpen2(const AudioFormat in_audio_format)
{
const
ScopeUnlock
unlock
(
mutex
);
output
->
Close
(
false
);
output
->
Close
Output
(
false
);
}
std
::
throw_with_nested
(
FormatRuntimeError
(
"Failed to convert for
\"
%s
\"
[%s]"
,
GetName
(),
output
->
plugin
.
name
));
}
}
{
const
ScopeUnlock
unlock
(
mutex
);
output
->
OpenSoftwareMixer
();
}
}
inline
bool
...
...
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