aboutsummaryrefslogtreecommitdiffstats
path: root/src/inputPlugins/mp4_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/mp4_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/mp4_plugin.c')
-rw-r--r--src/inputPlugins/mp4_plugin.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/inputPlugins/mp4_plugin.c b/src/inputPlugins/mp4_plugin.c
index d2c0f1b6c..ac681a073 100644
--- a/src/inputPlugins/mp4_plugin.c
+++ b/src/inputPlugins/mp4_plugin.c
@@ -83,7 +83,7 @@ static int mp4_decode(struct decoder * mpd_decoder, InputStream * inStream)
mp4ff_t *mp4fh;
mp4ff_callback_t *mp4cb;
int32_t track;
- float file_time;
+ float file_time, total_time;
int32_t scale;
faacDecHandle decoder;
faacDecFrameInfo frameInfo;
@@ -170,7 +170,7 @@ static int mp4_decode(struct decoder * mpd_decoder, InputStream * inStream)
free(mp4cb);
return -1;
}
- dc.totalTime = ((float)file_time) / scale;
+ total_time = ((float)file_time) / scale;
numSamples = mp4ff_num_samples(mp4fh, track);
@@ -248,7 +248,8 @@ static int mp4_decode(struct decoder * mpd_decoder, InputStream * inStream)
#endif
audio_format.sampleRate = scale;
audio_format.channels = frameInfo.channels;
- decoder_initialized(mpd_decoder, &audio_format);
+ decoder_initialized(mpd_decoder, &audio_format,
+ total_time);
}
if (channels * (unsigned long)(dur + offset) > frameInfo.samples) {