diff options
author | Max Kellermann <max@musicpd.org> | 2020-05-27 15:54:23 +0200 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2020-05-27 15:54:34 +0200 |
commit | 8e4ca2372763929841c45acefc50c4c7356b9228 (patch) | |
tree | cec5d67303c1a76c9f3462e29dc93d37bc286da7 /src/lib | |
parent | bdc861f0582a7ca5c20b1eaf1ebae685fa0b85a2 (diff) |
lib/ffmpeg/Time: replace C99 compound literal with C++ initializer list
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/ffmpeg/Time.hxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/ffmpeg/Time.hxx b/src/lib/ffmpeg/Time.hxx index e172126aa..3e02fc1b6 100644 --- a/src/lib/ffmpeg/Time.hxx +++ b/src/lib/ffmpeg/Time.hxx @@ -45,7 +45,7 @@ FfmpegTimeToDouble(int64_t t, const AVRational time_base) noexcept { assert(t != (int64_t)AV_NOPTS_VALUE); - return FloatDuration(av_rescale_q(t, time_base, (AVRational){1, 1024})) + return FloatDuration(av_rescale_q(t, time_base, {1, 1024})) / 1024; } @@ -69,7 +69,7 @@ FromFfmpegTime(int64_t t, const AVRational time_base) noexcept assert(t != (int64_t)AV_NOPTS_VALUE); return SongTime::FromMS(av_rescale_q(t, time_base, - (AVRational){1, 1000})); + {1, 1000})); } /** |