Fixed a major bug in the Time Keyframe interpolation when rendering a video that caused the Replay to be restarted while rendering. This occurred whenever videoTime exactly matched a Time Keyframe's Position and was fixed by passing true to KeyframeList#getPreviousKeyframe and KeyframeList#getNextKeyframe, which therefore return the Keyframe itself if the timestamp matches.

This commit is contained in:
CrushedPixel
2015-07-23 13:13:36 +02:00
parent 6547595318
commit 13481416b7

View File

@@ -274,8 +274,8 @@ public class VideoRenderer implements RenderInfo {
// WARNING: The rest of this method contains some magic for which Marius is responsible
// Time interpolation
Keyframe<TimestampValue> lastTime = timeKeyframes.getPreviousKeyframe(videoTime, false);
Keyframe<TimestampValue> nextTime = timeKeyframes.getNextKeyframe(videoTime, false);
Keyframe<TimestampValue> lastTime = timeKeyframes.getPreviousKeyframe(videoTime, true);
Keyframe<TimestampValue> nextTime = timeKeyframes.getNextKeyframe(videoTime, true);
int lastTimeStamp = 0;
int nextTimeStamp = 0;