From: Steinar H. Gunderson Date: Tue, 22 Jan 2019 17:30:38 +0000 (+0100) Subject: Fix overly aggressive snapping at very low speeds. X-Git-Tag: 1.8.3~44 X-Git-Url: https://git.sesse.net/?p=nageru;a=commitdiff_plain;h=46ab69c1586b8920ce2735bdf2a0bbc811ee48fd;hp=978b42bf2e535f40f73a1afec86789294f375c1e Fix overly aggressive snapping at very low speeds. --- diff --git a/futatabi/player.cpp b/futatabi/player.cpp index 30dccc8..ce165d0 100644 --- a/futatabi/player.cpp +++ b/futatabi/player.cpp @@ -350,7 +350,7 @@ void Player::play_playlist_once() // Snap to input frame: If we can do so with less than 1% jitter // (ie., move less than 1% of an _output_ frame), do so. // TODO: Snap secondary (fade-to) clips in the same fashion. - double pts_snap_tolerance = 0.01 * double(TIMEBASE) / global_flags.output_framerate; + double pts_snap_tolerance = 0.01 * double(TIMEBASE) * clip->speed / global_flags.output_framerate; bool snapped = false; for (FrameOnDisk snap_frame : { frame_lower, frame_upper }) { if (fabs(snap_frame.pts - in_pts) < pts_snap_tolerance) {