aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder_control.h
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_control.h
parentbfa7da943c2ee90ca84664ce0d97b77ed27311f9 (diff)
downloadmpd-89893faa19aef5623b8d4ea9e71b346edbd78435.tar.gz
mpd-89893faa19aef5623b8d4ea9e71b346edbd78435.tar.xz
mpd-89893faa19aef5623b8d4ea9e71b346edbd78435.zip
decoder_control: merge next_song and current_song
These two variables are redundant, we need only one of them.
Diffstat (limited to 'src/decoder_control.h')
-rw-r--r--src/decoder_control.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/decoder_control.h b/src/decoder_control.h
index f3bd26d53..a70adff05 100644
--- a/src/decoder_control.h
+++ b/src/decoder_control.h
@@ -72,8 +72,13 @@ struct decoder_control {
/** the format being sent to the music pipe */
struct audio_format out_audio_format;
- const struct song *current_song;
- const struct song *next_song;
+ /**
+ * The song currently being decoded. This attribute is set by
+ * the player thread, when it sends the #DECODE_COMMAND_START
+ * command.
+ */
+ const struct song *song;
+
float total_time;
/** the #music_chunk allocator */
@@ -198,7 +203,7 @@ decoder_current_song(const struct decoder_control *dc)
case DECODE_STATE_START:
case DECODE_STATE_DECODE:
- return dc->current_song;
+ return dc->song;
}
assert(false);