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:
@@ -68,8 +68,10 @@ decoder_input_stream_open(DecoderControl &dc, const char *uri, Error &error)
|
|||||||
const ScopeLock protect(dc.mutex);
|
const ScopeLock protect(dc.mutex);
|
||||||
|
|
||||||
is->Update();
|
is->Update();
|
||||||
while (!is->IsReady() &&
|
while (!is->IsReady()) {
|
||||||
dc.command != DecoderCommand::STOP) {
|
if (dc.command == DecoderCommand::STOP)
|
||||||
|
return nullptr;
|
||||||
|
|
||||||
dc.Wait();
|
dc.Wait();
|
||||||
|
|
||||||
is->Update();
|
is->Update();
|
||||||
|
Reference in New Issue
Block a user