Commit ac74f284 authored by Max Kellermann's avatar Max Kellermann

decoder/Bridge: check for STOP before InputStream::IsReady()

If the DecoderThread gets woken up by a STOP command, this should be detected as early as possible.
parent 77af999b
......@@ -368,15 +368,15 @@ DecoderBridge::OpenUri(const char *uri)
const std::lock_guard<Mutex> 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);
}
}
......
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