summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2018-09-21 19:37:56 +0200
committerMax Kellermann <max@musicpd.org>2018-09-21 20:42:34 +0200
commit90f4e97751a7ff2752d12f611cf779b7c8f5804a (patch)
tree971ca26f7502289fa46c62e95e2e7c4baf04a8cf /src/lib
parentd1bcd98f79c35eff78188a47e7ac3c869f3df1dc (diff)
decoder/Client: use std::chrono::duration<double> instead of raw `double`
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/ffmpeg/Time.hxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/ffmpeg/Time.hxx b/src/lib/ffmpeg/Time.hxx
index cba1fe4c1..4df737ec4 100644
--- a/src/lib/ffmpeg/Time.hxx
+++ b/src/lib/ffmpeg/Time.hxx
@@ -40,13 +40,13 @@ extern "C" {
* Convert a FFmpeg time stamp to a floating point value (in seconds).
*/
gcc_const
-static inline double
+static inline FloatDuration
FfmpegTimeToDouble(int64_t t, const AVRational time_base) noexcept
{
assert(t != (int64_t)AV_NOPTS_VALUE);
- return (double)av_rescale_q(t, time_base, (AVRational){1, 1024})
- / (double)1024;
+ return FloatDuration(av_rescale_q(t, time_base, (AVRational){1, 1024}))
+ / 1024;
}
/**