From 2433c661cfff2a10b6f12fec0d53237ac35c333d Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Sat, 15 Dec 2018 00:32:39 +0100 Subject: [PATCH] Fix an issue where fade times would be zero seconds if the next clip was less than a second. --- futatabi/player.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/futatabi/player.cpp b/futatabi/player.cpp index e5562f7..b7b22c8 100644 --- a/futatabi/player.cpp +++ b/futatabi/player.cpp @@ -138,7 +138,7 @@ got_clip: if (next_clip.pts_in != -1) { got_next_clip = true; - double duration_next_clip = (next_clip.pts_out - next_clip.pts_in) / TIMEBASE / speed; + double duration_next_clip = double(next_clip.pts_out - next_clip.pts_in) / TIMEBASE / speed; next_clip_fade_time = std::min(time_left_this_clip, duration_next_clip); in_pts_start_next_clip = next_clip.pts_in + lrint(next_clip_fade_time * TIMEBASE * speed); } -- 2.39.2