diff --git a/src/output/MultipleOutputs.cxx b/src/output/MultipleOutputs.cxx index 10c3f30b5..ee14abca8 100644 --- a/src/output/MultipleOutputs.cxx +++ b/src/output/MultipleOutputs.cxx @@ -172,7 +172,7 @@ MultipleOutputs::Update(bool force) noexcept { bool ret = false; - if (!input_audio_format.IsDefined()) + if (!IsOpen()) return false; for (const auto &ao : outputs) diff --git a/src/output/MultipleOutputs.hxx b/src/output/MultipleOutputs.hxx index cc9b30d14..73e3ac00d 100644 --- a/src/output/MultipleOutputs.hxx +++ b/src/output/MultipleOutputs.hxx @@ -155,6 +155,15 @@ public: void SetSoftwareVolume(unsigned volume) noexcept; private: + /** + * Was Open() called successfully? + * + * This method may only be called from the player thread. + */ + bool IsOpen() const noexcept { + return input_audio_format.IsDefined(); + } + /** * Wait until all (active) outputs have finished the current * command.