decoder/Thread: throw StopDecoder if command==STOP in decoder_run_stream()
Everybody else is doing that, so let's do the same and not pretend playback was successful.
This commit is contained in:
parent
c2470ebd9c
commit
8671896e4c
|
@ -304,9 +304,11 @@ decoder_run_stream(DecoderBridge &bridge, const char *uri)
|
|||
|
||||
std::unique_lock lock{dc.mutex};
|
||||
|
||||
if (bridge.dc.command == DecoderCommand::STOP)
|
||||
throw StopDecoder();
|
||||
|
||||
bool tried = false;
|
||||
return dc.command == DecoderCommand::STOP ||
|
||||
decoder_run_stream_locked(bridge, *input_stream, lock, uri,
|
||||
return decoder_run_stream_locked(bridge, *input_stream, lock, uri,
|
||||
tried) ||
|
||||
/* fallback to mp3: this is needed for bastard streams
|
||||
that don't have a suffix or set the mimeType */
|
||||
|
|
Loading…
Reference in New Issue