From 10be8a8714b49bec5e6f869975962cbc26cebe61 Mon Sep 17 00:00:00 2001
From: Max Kellermann <max@duempel.org>
Date: Fri, 6 Mar 2009 00:41:59 +0100
Subject: playlist_control: fix requeue after seek

The queue update after a seek was wrong: the queued song is cleared by
a successful seek.  This caused queue/cross-fading problems after a
seek.
---
 src/playlist_control.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/playlist_control.c b/src/playlist_control.c
index 6691df78c..87cea65a5 100644
--- a/src/playlist_control.c
+++ b/src/playlist_control.c
@@ -236,13 +236,13 @@ seekSongInPlaylist(struct playlist *playlist, unsigned song, float seek_time)
 
 	ret = playerSeek(queue_get_order(&playlist->queue, i), seek_time);
 	if (ret < 0) {
-		playlist->queued = -1;
-		playlist_update_queued_song(playlist, NULL);
+		playlist_update_queued_song(playlist, queued);
 
 		return PLAYLIST_RESULT_NOT_PLAYING;
 	}
 
-	playlist_update_queued_song(playlist, queued);
+	playlist->queued = -1;
+	playlist_update_queued_song(playlist, NULL);
 
 	return PLAYLIST_RESULT_SUCCESS;
 }
-- 
cgit v1.2.3