From 76a9049739a0e05c57a778e62fa5cb7a89b96937 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 11 Nov 2015 17:28:48 +0100 Subject: 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. --- src/decoder/DecoderControl.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') 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; -- cgit v1.2.3