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
3ab90564
Commit
3ab90564
authored
Aug 08, 2017
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
output/Shout: open the encoder first, then open connection
This order will be necessary for proper AudioFormat initialization, because the encoder may change the format.
parent
f46d5453
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
11 deletions
+5
-11
ShoutOutputPlugin.cxx
src/output/plugins/ShoutOutputPlugin.cxx
+5
-11
No files found.
src/output/plugins/ShoutOutputPlugin.cxx
View file @
3ab90564
...
...
@@ -348,19 +348,13 @@ ShoutOpen(shout_t *shout_conn)
void
ShoutOutput
::
Open
(
AudioFormat
&
audio_format
)
{
ShoutOpen
(
shout_conn
);
encoder
=
prepared_encoder
->
Open
(
audio_format
);
try
{
encoder
=
prepared_encoder
->
Open
(
audio_format
);
try
{
WritePage
();
}
catch
(
const
std
::
runtime_error
&
)
{
delete
encoder
;
throw
;
}
}
catch
(
const
std
::
runtime_error
&
)
{
shout_close
(
shout_conn
);
ShoutOpen
(
shout_conn
);
WritePage
();
}
catch
(...)
{
delete
encoder
;
throw
;
}
}
...
...
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