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
17321663
Commit
17321663
authored
Dec 24, 2013
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
OutputThread: handle failing ReplayGainFilter::Open()
Since opening the PcmVolume object can now fail, this case must be handled.
parent
8edde7a4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
4 deletions
+10
-4
OutputThread.cxx
src/OutputThread.cxx
+10
-4
No files found.
src/OutputThread.cxx
View file @
17321663
...
...
@@ -96,10 +96,16 @@ ao_filter_open(struct audio_output *ao, AudioFormat &format,
assert
(
format
.
IsValid
());
/* the replay_gain filter cannot fail here */
if
(
ao
->
replay_gain_filter
!=
nullptr
)
ao
->
replay_gain_filter
->
Open
(
format
,
error_r
);
if
(
ao
->
other_replay_gain_filter
!=
nullptr
)
ao
->
other_replay_gain_filter
->
Open
(
format
,
error_r
);
if
(
ao
->
replay_gain_filter
!=
nullptr
&&
!
ao
->
replay_gain_filter
->
Open
(
format
,
error_r
).
IsDefined
())
return
AudioFormat
::
Undefined
();
if
(
ao
->
other_replay_gain_filter
!=
nullptr
&&
!
ao
->
other_replay_gain_filter
->
Open
(
format
,
error_r
).
IsDefined
())
{
if
(
ao
->
replay_gain_filter
!=
nullptr
)
ao
->
replay_gain_filter
->
Close
();
return
AudioFormat
::
Undefined
();
}
const
AudioFormat
af
=
ao
->
filter
->
Open
(
format
,
error_r
);
if
(
!
af
.
IsDefined
())
{
...
...
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