]> git.sesse.net Git - nageru/commitdiff
Fix an issue where fade times would be zero seconds if the next clip was less than...
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Fri, 14 Dec 2018 23:32:39 +0000 (00:32 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Fri, 14 Dec 2018 23:32:39 +0000 (00:32 +0100)
futatabi/player.cpp

index e5562f7f307e21fcfa7c288425a3f440bc62a74d..b7b22c8add9dea82b613f06bcc710e1dd529b92d 100644 (file)
@@ -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);
                                }