From ef40e362c9f622c8840419981c0681deeaf4509f Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sun, 27 Nov 2011 19:19:43 +0100 Subject: decoder_api: cancel initial seek when song is not seekable Fixes assertion failure. --- src/decoder_api.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src') diff --git a/src/decoder_api.c b/src/decoder_api.c index 6dcca32c2..695ca0281 100644 --- a/src/decoder_api.c +++ b/src/decoder_api.c @@ -95,6 +95,12 @@ decoder_prepare_initial_seek(struct decoder *decoder) return true; if (decoder->initial_seek_pending) { + if (!dc->seekable) { + /* seeking is not possible */ + decoder->initial_seek_pending = false; + return false; + } + if (dc->command == DECODE_COMMAND_NONE) { /* begin initial seek */ -- cgit v1.2.3