Commit e8121fdc authored by Max Kellermann's avatar Max Kellermann

decoder/Thread: fail decoder_input_stream_open() if STOP is received

Fixes an assertion failure in tag_ape_scan() which is because decoder_input_stream_open() returns an "unready" InputStream.
parent 21f17270
......@@ -68,8 +68,10 @@ decoder_input_stream_open(DecoderControl &dc, const char *uri, Error &error)
const ScopeLock protect(dc.mutex);
is->Update();
while (!is->IsReady() &&
dc.command != DecoderCommand::STOP) {
while (!is->IsReady()) {
if (dc.command == DecoderCommand::STOP)
return nullptr;
dc.Wait();
is->Update();
......
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