aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2015-11-11 17:28:48 +0100
committerMax Kellermann <max@duempel.org>2015-11-11 17:46:06 +0100
commit76a9049739a0e05c57a778e62fa5cb7a89b96937 (patch)
tree656d1ab28fa9d8faefa83ac17e3e68f986a2b466 /src
parent27bfcda20de83e14f015017f2a7402342112a4af (diff)
downloadmpd-76a9049739a0e05c57a778e62fa5cb7a89b96937.tar.gz
mpd-76a9049739a0e05c57a778e62fa5cb7a89b96937.tar.xz
mpd-76a9049739a0e05c57a778e62fa5cb7a89b96937.zip
decoder/Control: State::ERROR is illegal
The state ERROR can only be entered during decoder initialization, and Seek() may only be called after initialization has been finished.
Diffstat (limited to 'src')
-rw-r--r--src/decoder/DecoderControl.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/decoder/DecoderControl.cxx b/src/decoder/DecoderControl.cxx
index 648e816d8..c41165d1e 100644
--- a/src/decoder/DecoderControl.cxx
+++ b/src/decoder/DecoderControl.cxx
@@ -108,12 +108,13 @@ bool
DecoderControl::Seek(SongTime t)
{
assert(state != DecoderState::START);
+ assert(state != DecoderState::ERROR);
switch (state) {
case DecoderState::START:
+ case DecoderState::ERROR:
gcc_unreachable();
- case DecoderState::ERROR:
case DecoderState::STOP:
return false;