aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2011-11-27 19:19:43 +0100
committerMax Kellermann <max@duempel.org>2011-11-27 19:19:43 +0100
commitef40e362c9f622c8840419981c0681deeaf4509f (patch)
treeebfce02f73907d17d6194ad4073829353b461633 /src/decoder
parent6452461c3903139c7bbed3d1eb2705bf1dde656f (diff)
downloadmpd-ef40e362c9f622c8840419981c0681deeaf4509f.tar.gz
mpd-ef40e362c9f622c8840419981c0681deeaf4509f.tar.xz
mpd-ef40e362c9f622c8840419981c0681deeaf4509f.zip
decoder_api: cancel initial seek when song is not seekable
Fixes assertion failure.
Diffstat (limited to '')
-rw-r--r--src/decoder_api.c6
1 files changed, 6 insertions, 0 deletions
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 */