decoder/API: decoder_open_uri() can throw StopDecoder
This commit is contained in:
parent
93209da176
commit
fac610d47b
@ -275,7 +275,7 @@ decoder_open_uri(Decoder &decoder, const char *uri)
|
|||||||
return is;
|
return is;
|
||||||
|
|
||||||
if (dc.command == DecoderCommand::STOP)
|
if (dc.command == DecoderCommand::STOP)
|
||||||
return nullptr;
|
throw StopDecoder();
|
||||||
|
|
||||||
cond.wait(mutex);
|
cond.wait(mutex);
|
||||||
}
|
}
|
||||||
|
@ -118,8 +118,9 @@ void
|
|||||||
decoder_seek_error(Decoder &decoder);
|
decoder_seek_error(Decoder &decoder);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Open a new #InputStream and wait until it's ready. Can get
|
* Open a new #InputStream and wait until it's ready.
|
||||||
* cancelled by DecoderCommand::STOP (returns nullptr).
|
*
|
||||||
|
* Throws #StopDecoder if DecoderCommand::STOP was received.
|
||||||
*
|
*
|
||||||
* Throws std::runtime_error on error.
|
* Throws std::runtime_error on error.
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user