From 46ab69c1586b8920ce2735bdf2a0bbc811ee48fd Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Tue, 22 Jan 2019 18:30:38 +0100 Subject: [PATCH] Fix overly aggressive snapping at very low speeds. --- futatabi/player.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) { -- 2.39.2