diff --git a/src/decoder/Bridge.cxx b/src/decoder/Bridge.cxx index a03f1779c..1a695cede 100644 --- a/src/decoder/Bridge.cxx +++ b/src/decoder/Bridge.cxx @@ -368,15 +368,15 @@ DecoderBridge::OpenUri(const char *uri) const std::lock_guard lock(mutex); while (true) { + if (dc.command == DecoderCommand::STOP) + throw StopDecoder(); + is->Update(); if (is->IsReady()) { is->Check(); return is; } - if (dc.command == DecoderCommand::STOP) - throw StopDecoder(); - cond.wait(mutex); } }