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:
Max Kellermann 2024-07-11 16:28:42 +02:00
parent c2470ebd9c
commit 8671896e4c
1 changed files with 5 additions and 3 deletions

View File

@ -304,10 +304,12 @@ 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,
tried) ||
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 */
(!tried &&