]> git.sesse.net Git - nageru/blobdiff - futatabi/player.cpp
Fix an overflow issue with long (>= 10 min) clips.
[nageru] / futatabi / player.cpp
index ce165d03f90461066e38cd312a76ef27948b0eea..9c20278702abcb4a50a6284068667b0dad102602 100644 (file)
@@ -181,7 +181,7 @@ void Player::play_playlist_once()
                }
 
                steady_clock::time_point next_frame_start;
-               for (int frameno = 0; !should_quit; ++frameno) {  // Ends when the clip ends.
+               for (int64_t frameno = 0; !should_quit; ++frameno) {  // Ends when the clip ends.
                        double out_pts = out_pts_origin + TIMEBASE * frameno / global_flags.output_framerate;
                        next_frame_start =
                                origin + microseconds(lrint((out_pts - out_pts_origin) * 1e6 / TIMEBASE));