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,10 +304,12 @@ decoder_run_stream(DecoderBridge &bridge, const char *uri)
|
|||||||
|
|
||||||
std::unique_lock lock{dc.mutex};
|
std::unique_lock lock{dc.mutex};
|
||||||
|
|
||||||
|
if (bridge.dc.command == DecoderCommand::STOP)
|
||||||
|
throw StopDecoder();
|
||||||
|
|
||||||
bool tried = false;
|
bool tried = false;
|
||||||
return dc.command == DecoderCommand::STOP ||
|
return decoder_run_stream_locked(bridge, *input_stream, lock, uri,
|
||||||
decoder_run_stream_locked(bridge, *input_stream, lock, uri,
|
tried) ||
|
||||||
tried) ||
|
|
||||||
/* fallback to mp3: this is needed for bastard streams
|
/* fallback to mp3: this is needed for bastard streams
|
||||||
that don't have a suffix or set the mimeType */
|
that don't have a suffix or set the mimeType */
|
||||||
(!tried &&
|
(!tried &&
|
||||||
|
Loading…
x
Reference in New Issue
Block a user