Commit ccc0fcb5 authored by Max Kellermann's avatar Max Kellermann

output/Shout: move ConfigureShoutAudioInfo() call to Open()

Configure the AudioFormat after opening the encoder, because only now we know the final format.
parent 6e243819
...@@ -224,8 +224,6 @@ ShoutOutput::ShoutOutput(const ConfigBlock &block) ...@@ -224,8 +224,6 @@ ShoutOutput::ShoutOutput(const ConfigBlock &block)
if (value != nullptr && shout_set_url(shout_conn, value)) if (value != nullptr && shout_set_url(shout_conn, value))
throw std::runtime_error(shout_get_error(shout_conn)); throw std::runtime_error(shout_get_error(shout_conn));
ShoutSetAudioInfo(shout_conn, audio_format);
{ {
char temp[11]; char temp[11];
if (quality >= -1.0) { if (quality >= -1.0) {
...@@ -357,6 +355,7 @@ ShoutOutput::Open(AudioFormat &audio_format) ...@@ -357,6 +355,7 @@ ShoutOutput::Open(AudioFormat &audio_format)
encoder = prepared_encoder->Open(audio_format); encoder = prepared_encoder->Open(audio_format);
try { try {
ShoutSetAudioInfo(shout_conn, audio_format);
ShoutOpen(shout_conn); ShoutOpen(shout_conn);
WritePage(); WritePage();
} catch (...) { } catch (...) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment