summaryrefslogtreecommitdiff
path: root/src/decoder
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2017-09-27 17:08:16 +0200
committerMax Kellermann <max@musicpd.org>2017-09-27 17:08:16 +0200
commitfa67c2548a75c3788feb12f494ad3f3627257b42 (patch)
tree396cdca7dbdffe38f358cf604f48fd273c506141 /src/decoder
parentea80587ddb1905851623200b4cf5ef260f8c9631 (diff)
decoder/Thread: clear the command after catching an exception
If an early exception gets caught (e.g. from AllocatedPath::FromUTF8Throw()) before DecoderControl::CommandFinishedLocked() is called, the decoder thread would go in an endless loop, because DecoderCommand::START is still set. Closes #118
Diffstat (limited to 'src/decoder')
-rw-r--r--src/decoder/DecoderThread.cxx1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/decoder/DecoderThread.cxx b/src/decoder/DecoderThread.cxx
index e74ee0f84..7d4a91560 100644
--- a/src/decoder/DecoderThread.cxx
+++ b/src/decoder/DecoderThread.cxx
@@ -508,6 +508,7 @@ try {
decoder_run_song(dc, song, uri_utf8, path_fs);
} catch (...) {
dc.state = DecoderState::ERROR;
+ dc.command = DecoderCommand::NONE;
dc.error = std::current_exception();
dc.client_cond.signal();
}