Tracker effect and export video fixes

Fixed bug that made Openshot crash if two or more Tracker effects were added to the same video.
Fixed bug that made the clips to be incorrectly attached to tracked objects in the exported video.
This commit is contained in:
Brenno
2021-01-18 15:30:11 -03:00
parent b08e65f24f
commit cb61f914f7
4 changed files with 38 additions and 24 deletions

View File

@@ -475,7 +475,7 @@ std::map<std::string, float> TrackedObjectBBox::GetParentClipProperties(int64_t
// Calculate parentClip's frame number
long parentClip_start_position = round( parentClip->Position() * parentClip->info.fps.ToDouble() ) + 1;
long parentClip_start_frame = ( parentClip->Start() * parentClip->info.fps.ToDouble() ) + 1;
float parentClip_frame_number = frame_number - parentClip_start_position + parentClip_start_frame;
float parentClip_frame_number = round(frame_number - parentClip_start_position) + parentClip_start_frame;
// Get parentClip's Keyframes
float parentClip_location_x = parentClip->location_x.GetValue(parentClip_frame_number);