aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-01-21 16:36:30 +0100
committerMax Kellermann <max@duempel.org>2009-01-21 16:36:30 +0100
commita088d9f851dc5696dff409b2f9999c30c0d51bb0 (patch)
tree2f16a517e44479542db93b85c36b73d54cf696fd
parent38a9ad011a4ddb32040e296cb033f289e88e8e1e (diff)
downloadmpd-a088d9f851dc5696dff409b2f9999c30c0d51bb0.tar.gz
mpd-a088d9f851dc5696dff409b2f9999c30c0d51bb0.tar.xz
mpd-a088d9f851dc5696dff409b2f9999c30c0d51bb0.zip
player_thread: check for decoder failure before seeking
The function player_seek_decoder() starts the decoder, but does not check the return value of player_wait_for_decoder().
-rw-r--r--src/player_thread.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/player_thread.c b/src/player_thread.c
index 391e6f4d4..61095cc53 100644
--- a/src/player_thread.c
+++ b/src/player_thread.c
@@ -133,7 +133,10 @@ static bool player_seek_decoder(struct player *player)
player->next_song_chunk = -1;
music_pipe_clear();
dc_start_async(pc.next_song);
- player_wait_for_decoder(player);
+
+ ret = player_wait_for_decoder(player);
+ if (!ret)
+ return false;
}
where = pc.seek_where;