diff options
Diffstat (limited to 'src/decoder/plugins/Mp4v2DecoderPlugin.cxx')
-rw-r--r-- | src/decoder/plugins/Mp4v2DecoderPlugin.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/decoder/plugins/Mp4v2DecoderPlugin.cxx b/src/decoder/plugins/Mp4v2DecoderPlugin.cxx index d59be7f09..d4f7c5843 100644 --- a/src/decoder/plugins/Mp4v2DecoderPlugin.cxx +++ b/src/decoder/plugins/Mp4v2DecoderPlugin.cxx @@ -256,8 +256,10 @@ mp4_scan_file(Path path_fs, return false; } - const MP4Duration dur = MP4GetTrackDuration(handle, id) / - MP4GetTrackTimeScale(handle, id); + const MP4Timestamp scale = MP4GetTrackTimeScale(handle, id); + const SongTime dur = + SongTime::FromScale<uint64_t>(MP4GetTrackDuration(handle, id), + scale); tag_handler_invoke_duration(handler, handler_ctx, dur); const MP4Tags* tags = MP4TagsAlloc(); |