From d7d717f2ce096015527593f8e163dc3d59cf91fc Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 20 Jul 2011 11:33:51 +0200 Subject: playlist_control: don't resume playback when seeking to another song while paused Use a shortcut in playlist_seek_song(), don't call playlist_play_order() because that would reset the "paused" state. --- NEWS | 1 + src/playlist_control.c | 8 +++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/NEWS b/NEWS index ddba638c7..26a4c1134 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,6 @@ ver 0.16.4 (2011/??/??) * fix memory leaks +* don't resume playback when seeking to another song while paused * decoder: - ffmpeg: workaround for semantic API change in recent ffmpeg versions - flac: validate the sample rate when scanning the tag diff --git a/src/playlist_control.c b/src/playlist_control.c index ce9bc8442..76066d274 100644 --- a/src/playlist_control.c +++ b/src/playlist_control.c @@ -222,10 +222,12 @@ playlist_seek_song(struct playlist *playlist, unsigned song, float seek_time) playlist->error_count = 0; if (!playlist->playing || (unsigned)playlist->current != i) { - /* seeking is not within the current song - first - start playing the new song */ + /* seeking is not within the current song - prepare + song change */ + + playlist->playing = true; + playlist->current = i; - playlist_play_order(playlist, i); queued = NULL; } -- cgit v1.2.3