decoder/Thread: convert "int ret" to "bool success"
This commit is contained in:
parent
09157c3130
commit
f081696f62
@ -385,11 +385,11 @@ decoder_run_song(DecoderControl &dc,
|
|||||||
|
|
||||||
decoder_command_finished_locked(dc);
|
decoder_command_finished_locked(dc);
|
||||||
|
|
||||||
int ret;
|
bool success;
|
||||||
{
|
{
|
||||||
const ScopeUnlock unlock(dc.mutex);
|
const ScopeUnlock unlock(dc.mutex);
|
||||||
|
|
||||||
ret = !path_fs.IsNull()
|
success = !path_fs.IsNull()
|
||||||
? decoder_run_file(decoder, uri, path_fs)
|
? decoder_run_file(decoder, uri, path_fs)
|
||||||
: decoder_run_stream(decoder, uri);
|
: decoder_run_stream(decoder, uri);
|
||||||
|
|
||||||
@ -404,7 +404,7 @@ decoder_run_song(DecoderControl &dc,
|
|||||||
DecoderControl */
|
DecoderControl */
|
||||||
dc.state = DecoderState::ERROR;
|
dc.state = DecoderState::ERROR;
|
||||||
dc.error = std::move(decoder.error);
|
dc.error = std::move(decoder.error);
|
||||||
} else if (ret)
|
} else if (success)
|
||||||
dc.state = DecoderState::STOP;
|
dc.state = DecoderState::STOP;
|
||||||
else {
|
else {
|
||||||
dc.state = DecoderState::ERROR;
|
dc.state = DecoderState::ERROR;
|
||||||
|
Loading…
Reference in New Issue
Block a user