aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder_control.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-03-25 19:48:14 +0100
committerMax Kellermann <max@duempel.org>2009-03-25 19:48:14 +0100
commit209c8a540c80faffb6b04ac6e7fed64a03c679ac (patch)
treeb484644f440e4c3d584e62ab751537fbc58d6055 /src/decoder_control.c
parent1e9659bf1f84dc260129007a17cc4bbe1d146ada (diff)
downloadmpd-209c8a540c80faffb6b04ac6e7fed64a03c679ac.tar.gz
mpd-209c8a540c80faffb6b04ac6e7fed64a03c679ac.tar.xz
mpd-209c8a540c80faffb6b04ac6e7fed64a03c679ac.zip
player_thread: wait for decoder before seeking
When the decoder initialization has not been completed yet, all calls to dc_seek() will fail, because dc.seekable is not initialized yet. Wait for the decoder to complete its initialization, i.e. until it has called decoder_initialized().
Diffstat (limited to 'src/decoder_control.c')
-rw-r--r--src/decoder_control.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/decoder_control.c b/src/decoder_control.c
index c04b373ad..4e7ade22c 100644
--- a/src/decoder_control.c
+++ b/src/decoder_control.c
@@ -86,6 +86,7 @@ dc_stop(struct notify *notify)
bool
dc_seek(struct notify *notify, double where)
{
+ assert(dc.state != DECODE_STATE_START);
assert(where >= 0.0);
if (dc.state == DECODE_STATE_STOP ||