From d9d97bd17bf0d9469dcf00120d3d3fdab87299bc Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 29 Aug 2014 20:52:39 +0200 Subject: DecoderAPI: pass SignedSongTime to decoder_initialized() --- src/decoder/plugins/Mp4v2DecoderPlugin.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/decoder/plugins/Mp4v2DecoderPlugin.cxx') diff --git a/src/decoder/plugins/Mp4v2DecoderPlugin.cxx b/src/decoder/plugins/Mp4v2DecoderPlugin.cxx index ef5284437..d59be7f09 100644 --- a/src/decoder/plugins/Mp4v2DecoderPlugin.cxx +++ b/src/decoder/plugins/Mp4v2DecoderPlugin.cxx @@ -149,7 +149,8 @@ mp4_file_decode(Decoder &mpd_decoder, Path path_fs) /* initialize the MPD core */ const MP4Timestamp scale = MP4GetTrackTimeScale(handle, track); - const float duration = ((float)MP4GetTrackDuration(handle, track)) / scale + 0.5f; + const SongTime duration = SongTime::FromScale(MP4GetTrackDuration(handle, track), + scale); const MP4SampleId num_samples = MP4GetTrackNumberOfSamples(handle, track); decoder_initialized(mpd_decoder, audio_format, true, duration); -- cgit v1.2.3