From 0c2d767f6fca030a8da3202c05b3eb80ba176ef1 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 26 Aug 2014 21:52:28 +0200 Subject: DecoderAPI: use std::chrono::duration for decoder_seek*() For type safety and code readability. --- src/decoder/plugins/Mp4v2DecoderPlugin.cxx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/decoder/plugins/Mp4v2DecoderPlugin.cxx') 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); -- cgit v1.2.3