]> git.sesse.net Git - nageru/commit
Fix some jerkiness when playing back with no interpolation.
authorSteinar H. Gunderson <steinar+nageru@gunderson.no>
Mon, 21 Oct 2019 19:32:34 +0000 (21:32 +0200)
committerBigscreen user <bigscreen@bigscreen.party.solskogen.no>
Mon, 21 Oct 2019 20:35:48 +0000 (22:35 +0200)
commitf014bc9a81cc4fae068172a84f0491efef38135e
treee673f7e43ae122baf929013e1e5a822f7f38cce2
parent690a6ff5c93d98141d5ba658545ef33a79f9ecf9
Fix some jerkiness when playing back with no interpolation.

When hitting a frame exactly, we'd choose [pts_of_previous_frame, pts]
as our candidate range, and always pick the lower. This would make us
jerk around a lot, which would be a particular problem with audio.

Fix by taking a two-pronged approach: First, if we hit a frame exactly,
just send [pts,pts]. Second, activate snapping even when interpolation
is off.

We still have a problem when playing back audio in the case of dropped
video frames (we'll output the same audio twice), but better audio
handling is somewhat outside the scope of this commit.
futatabi/player.cpp