Refactoring timeline_frame_number out of apply_layer() and TimelineInfoStruct, we already have this data in scope (on the background frame instance)

This commit is contained in:
Jonathan Thomas
2021-05-20 13:15:13 -05:00
parent 441cb186f6
commit a505f875d1
5 changed files with 12 additions and 17 deletions

View File

@@ -394,9 +394,9 @@ std::shared_ptr<Frame> Clip::GetFrame(std::shared_ptr<openshot::Frame> backgroun
// Apply global timeline effects (i.e. transitions & masks... if any)
if (timeline != NULL && options != NULL) {
if (options->is_top_clip) {
// Apply global timeline effects (only to top clip... if overlapping)
// Apply global timeline effects (only to top clip... if overlapping, pass in timeline frame number)
Timeline* timeline_instance = (Timeline*) timeline;
original_frame = timeline_instance->apply_effects(original_frame, options->timeline_frame_number, Layer());
original_frame = timeline_instance->apply_effects(original_frame, background_frame->number, Layer());
}
}