diff options
Diffstat (limited to '')
-rw-r--r-- | src/decoder_control.c | 1 | ||||
-rw-r--r-- | src/player_thread.c | 11 |
2 files changed, 12 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 || diff --git a/src/player_thread.c b/src/player_thread.c index 84487c7bb..02f80ae8c 100644 --- a/src/player_thread.c +++ b/src/player_thread.c @@ -301,6 +301,17 @@ static bool player_seek_decoder(struct player *player) player->queued = false; } + /* wait for the decoder to complete initialization */ + + while (player->decoder_starting) { + ret = player_check_decoder_startup(player); + if (!ret) { + /* decoder failure */ + player_command_finished(); + return false; + } + } + /* send the SEEK command */ where = pc.seek_where; |