diff options
author | Max Kellermann <max@duempel.org> | 2008-08-26 08:27:03 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-08-26 08:27:03 +0200 |
commit | d507ff28c8ae18d4a17c8565de723fb522d2473d (patch) | |
tree | 8715ad61b9aa6700ddbe37a84d3e6650477155d7 /src/player.c | |
parent | b6909da758f90e8f4aeea1309030364b8d6e0505 (diff) |
added dc.next_song, renamed pc.current_song
Since pc->current_song denotes the song which the decoder should use
next, we should move it to DecoderControl. This removes one internal
PlayerControl struct access from the decoder code.
Also add pc.next_song, which is manipulated by the playlist code, and
gets copied to dc.next_song as soon as the decoder is started.
Diffstat (limited to 'src/player.c')
-rw-r--r-- | src/player.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/player.c b/src/player.c index bdce70bbf..61b380b84 100644 --- a/src/player.c +++ b/src/player.c @@ -18,7 +18,6 @@ #include "player.h" #include "path.h" -#include "decode.h" #include "command.h" #include "log.h" #include "playerData.h" @@ -101,7 +100,7 @@ int playerWait(int fd) static void set_current_song(Song *song) { pc.fileTime = song->tag ? song->tag->time : 0; - pc.current_song = song; + pc.next_song = song; } int playerPlay(int fd, Song * song) @@ -279,7 +278,7 @@ int playerSeek(int fd, Song * song, float seek_time) return -1; } - if (pc.current_song != song) + if (pc.next_song != song) set_current_song(song); if (pc.error == PLAYER_ERROR_NOERROR) { |