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.
This commit is contained in:
parent
21f17270a1
commit
e8121fdc11
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue