aboutsummaryrefslogtreecommitdiff
path: root/src/decoder_thread.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-11-03 20:02:19 +0100
committerMax Kellermann <max@duempel.org>2009-11-03 20:02:19 +0100
commit89893faa19aef5623b8d4ea9e71b346edbd78435 (patch)
tree0d1d33793285c06d5237709c5e40ed7e4a4040cb /src/decoder_thread.c
parentbfa7da943c2ee90ca84664ce0d97b77ed27311f9 (diff)
decoder_control: merge next_song and current_song
These two variables are redundant, we need only one of them.
Diffstat (limited to 'src/decoder_thread.c')
-rw-r--r--src/decoder_thread.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/decoder_thread.c b/src/decoder_thread.c
index d02e6985..175f343e 100644
--- a/src/decoder_thread.c
+++ b/src/decoder_thread.c
@@ -268,9 +268,11 @@ decoder_run_song(struct decoder_control *dc,
static void
decoder_run(struct decoder_control *dc)
{
- const struct song *song = dc->next_song;
+ const struct song *song = dc->song;
char *uri;
+ assert(song != NULL);
+
if (song_is_file(song))
uri = map_song_fs(song);
else
@@ -281,7 +283,6 @@ decoder_run(struct decoder_control *dc)
return;
}
- dc->current_song = dc->next_song; /* NEED LOCK */
decoder_run_song(dc, song, uri);
g_free(uri);