diff options
author | Max Kellermann <max@duempel.org> | 2014-08-29 20:52:39 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-08-29 21:40:15 +0200 |
commit | d9d97bd17bf0d9469dcf00120d3d3fdab87299bc (patch) | |
tree | d7abd9d0cbc6e417aaf4427740bf47207f47d7fa /src/decoder/plugins/Mp4v2DecoderPlugin.cxx | |
parent | 94f6380d693b8bece655885d37495a3a73c78b62 (diff) | |
download | mpd-d9d97bd17bf0d9469dcf00120d3d3fdab87299bc.tar.gz mpd-d9d97bd17bf0d9469dcf00120d3d3fdab87299bc.tar.xz mpd-d9d97bd17bf0d9469dcf00120d3d3fdab87299bc.zip |
DecoderAPI: pass SignedSongTime to decoder_initialized()
Diffstat (limited to 'src/decoder/plugins/Mp4v2DecoderPlugin.cxx')
-rw-r--r-- | src/decoder/plugins/Mp4v2DecoderPlugin.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
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<uint64_t>(MP4GetTrackDuration(handle, track), + scale); const MP4SampleId num_samples = MP4GetTrackNumberOfSamples(handle, track); decoder_initialized(mpd_decoder, audio_format, true, duration); |