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().
This commit is contained in:
Max Kellermann
2009-03-25 19:48:14 +01:00
parent 1e9659bf1f
commit 209c8a540c
2 changed files with 12 additions and 0 deletions

View File

@@ -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 ||