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.
This commit is contained in:
		| @@ -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; | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Max Kellermann
					Max Kellermann