diff options
author | Max Kellermann <max@duempel.org> | 2014-08-26 21:52:28 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-08-26 22:27:04 +0200 |
commit | 0c2d767f6fca030a8da3202c05b3eb80ba176ef1 (patch) | |
tree | 481acab9b4a1fadf8e208142bde510167b406d7e /src/decoder/plugins/Mp4v2DecoderPlugin.cxx | |
parent | 02e697032f7f375e67acc349ada6d849edf51aa3 (diff) | |
download | mpd-0c2d767f6fca030a8da3202c05b3eb80ba176ef1.tar.gz mpd-0c2d767f6fca030a8da3202c05b3eb80ba176ef1.tar.xz mpd-0c2d767f6fca030a8da3202c05b3eb80ba176ef1.zip |
DecoderAPI: use std::chrono::duration for decoder_seek*()
For type safety and code readability.
Diffstat (limited to '')
-rw-r--r-- | src/decoder/plugins/Mp4v2DecoderPlugin.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/decoder/plugins/Mp4v2DecoderPlugin.cxx b/src/decoder/plugins/Mp4v2DecoderPlugin.cxx index e968be20b..ef5284437 100644 --- a/src/decoder/plugins/Mp4v2DecoderPlugin.cxx +++ b/src/decoder/plugins/Mp4v2DecoderPlugin.cxx @@ -165,9 +165,8 @@ mp4_file_decode(Decoder &mpd_decoder, Path path_fs) unsigned int data_length = 0; if (cmd == DecoderCommand::SEEK) { - const unsigned offset_ms = - decoder_seek_where_ms(mpd_decoder); - const MP4Timestamp offset = (offset_ms * scale) / 1000; + const MP4Timestamp offset = + decoder_seek_time(mpd_decoder).ToScale(scale); sample = MP4GetSampleIdFromTime(handle, track, offset, false); |