You've already forked libopenshot
mirror of
https://github.com/OpenShot/libopenshot.git
synced 2026-03-02 08:53:52 -08:00
Fixing a bug in Keyframe that caused the GetDelta() function to return 0.0 early - which was breaking reversed time curves (zero'ing out the first frame or two)
This commit is contained in:
@@ -399,7 +399,7 @@ void Keyframe::SetJsonValue(const Json::Value root) {
|
||||
double Keyframe::GetDelta(int64_t index) const {
|
||||
if (index < 1) return 0.0;
|
||||
if (index == 1 && !Points.empty()) return Points[0].co.Y;
|
||||
if (index >= GetLength()) return 0.0;
|
||||
if (index > GetLength()) return 1.0;
|
||||
return GetValue(index) - GetValue(index - 1);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user