aboutsummaryrefslogtreecommitdiffstats
path: root/src/inputPlugins/mpc_plugin.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-08-26 08:27:05 +0200
committerMax Kellermann <max@duempel.org>2008-08-26 08:27:05 +0200
commit0d8b551c5a3aeadfd6901469946078d5a95ecb42 (patch)
tree3fd36e06ef46dfcfc7f9e426b42668318aec8d59 /src/inputPlugins/mpc_plugin.c
parent4590a98f0eb9484e185e7e0c25a3373c8e9076ea (diff)
downloadmpd-0d8b551c5a3aeadfd6901469946078d5a95ecb42.tar.gz
mpd-0d8b551c5a3aeadfd6901469946078d5a95ecb42.tar.xz
mpd-0d8b551c5a3aeadfd6901469946078d5a95ecb42.zip
added parameter total_time to decoder_initialized()
Similar to the previous patch: pass total_time instead of manipulating dc->totalTime directly.
Diffstat (limited to 'src/inputPlugins/mpc_plugin.c')
-rw-r--r--src/inputPlugins/mpc_plugin.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/inputPlugins/mpc_plugin.c b/src/inputPlugins/mpc_plugin.c
index 5a57ea4c8..399adf972 100644
--- a/src/inputPlugins/mpc_plugin.c
+++ b/src/inputPlugins/mpc_plugin.c
@@ -160,8 +160,6 @@ static int mpc_decode(struct decoder * mpd_decoder, InputStream * inStream)
return 0;
}
- dc.totalTime = mpc_streaminfo_get_length(&info);
-
audio_format.bits = 16;
audio_format.channels = info.channels;
audio_format.sampleRate = info.sample_freq;
@@ -172,7 +170,8 @@ static int mpc_decode(struct decoder * mpd_decoder, InputStream * inStream)
replayGainInfo->trackGain = info.gain_title * 0.01;
replayGainInfo->trackPeak = info.peak_title / 32767.0;
- decoder_initialized(mpd_decoder, &audio_format);
+ decoder_initialized(mpd_decoder, &audio_format,
+ mpc_streaminfo_get_length(&info));
while (!eof) {
if (dc.command == DECODE_COMMAND_SEEK) {