From 89893faa19aef5623b8d4ea9e71b346edbd78435 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 3 Nov 2009 20:02:19 +0100 Subject: decoder_control: merge next_song and current_song These two variables are redundant, we need only one of them. --- src/decoder_thread.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/decoder_thread.c') diff --git a/src/decoder_thread.c b/src/decoder_thread.c index d02e6985c..175f343e0 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); -- cgit v1.2.3