summaryrefslogtreecommitdiff
path: root/src/lib/ffmpeg/Time.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/ffmpeg/Time.hxx')
-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;
}
/**