diff options
author | Max Kellermann <max@musicpd.org> | 2017-08-08 18:37:13 +0200 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2017-08-08 18:56:14 +0200 |
commit | ccc0fcb5b79349456b702663cc674069c826b6ce (patch) | |
tree | afd818481d7f4d1e41d434fd365ffc4da7c087cd | |
parent | 6e24381962b0ce7d7c169fe0d86bef339dffd491 (diff) |
output/Shout: move ConfigureShoutAudioInfo() call to Open()
Configure the AudioFormat after opening the encoder, because only now
we know the final format.
-rw-r--r-- | src/output/plugins/ShoutOutputPlugin.cxx | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/output/plugins/ShoutOutputPlugin.cxx b/src/output/plugins/ShoutOutputPlugin.cxx index eb61269a0..4b99662e4 100644 --- a/src/output/plugins/ShoutOutputPlugin.cxx +++ b/src/output/plugins/ShoutOutputPlugin.cxx @@ -224,8 +224,6 @@ ShoutOutput::ShoutOutput(const ConfigBlock &block) if (value != nullptr && shout_set_url(shout_conn, value)) throw std::runtime_error(shout_get_error(shout_conn)); - ShoutSetAudioInfo(shout_conn, audio_format); - { char temp[11]; if (quality >= -1.0) { @@ -357,6 +355,7 @@ ShoutOutput::Open(AudioFormat &audio_format) encoder = prepared_encoder->Open(audio_format); try { + ShoutSetAudioInfo(shout_conn, audio_format); ShoutOpen(shout_conn); WritePage(); } catch (...) { |