From: Steinar H. Gunderson Date: Fri, 14 Dec 2018 23:32:39 +0000 (+0100) Subject: Fix an issue where fade times would be zero seconds if the next clip was less than... X-Git-Tag: 1.8.0~20 X-Git-Url: https://git.sesse.net/?p=nageru;a=commitdiff_plain;h=2433c661cfff2a10b6f12fec0d53237ac35c333d Fix an issue where fade times would be zero seconds if the next clip was less than a second. --- 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); }