@@ -438,7 +438,7 @@ std::shared_ptr<Frame> Clip::GetFrame(std::shared_ptr<openshot::Frame> backgroun
438438 apply_timemapping (frame);
439439
440440 // Apply waveform image (if any)
441- apply_waveform (frame, background_frame-> GetImage () );
441+ apply_waveform (frame, background_frame);
442442
443443 // Apply local effects to the frame (if any)
444444 apply_effects (frame);
@@ -453,7 +453,7 @@ std::shared_ptr<Frame> Clip::GetFrame(std::shared_ptr<openshot::Frame> backgroun
453453 }
454454
455455 // Apply keyframe / transforms
456- apply_keyframes (frame, background_frame-> GetImage () );
456+ apply_keyframes (frame, background_frame);
457457
458458 // Add final frame to cache
459459 final_cache.Add (frame);
@@ -1224,7 +1224,7 @@ bool Clip::isEqual(double a, double b)
12241224}
12251225
12261226// Apply keyframes to the source frame (if any)
1227- void Clip::apply_keyframes (std::shared_ptr<Frame> frame, std::shared_ptr<QImage> background_canvas ) {
1227+ void Clip::apply_keyframes (std::shared_ptr<Frame> frame, std::shared_ptr<Frame> background_frame ) {
12281228 // Skip out if video was disabled or only an audio frame (no visualisation in use)
12291229 if (!frame->has_image_data ) {
12301230 // Skip the rest of the image processing for performance reasons
@@ -1233,6 +1233,7 @@ void Clip::apply_keyframes(std::shared_ptr<Frame> frame, std::shared_ptr<QImage>
12331233
12341234 // Get image from clip
12351235 std::shared_ptr<QImage> source_image = frame->GetImage ();
1236+ std::shared_ptr<QImage> background_canvas = background_frame->GetImage ();
12361237
12371238 // Get transform from clip's keyframes
12381239 QTransform transform = get_transform (frame, background_canvas->width (), background_canvas->height ());
@@ -1291,7 +1292,7 @@ void Clip::apply_keyframes(std::shared_ptr<Frame> frame, std::shared_ptr<QImage>
12911292}
12921293
12931294// Apply apply_waveform image to the source frame (if any)
1294- void Clip::apply_waveform (std::shared_ptr<Frame> frame, std::shared_ptr<QImage> background_canvas ) {
1295+ void Clip::apply_waveform (std::shared_ptr<Frame> frame, std::shared_ptr<Frame> background_frame ) {
12951296
12961297 if (!Waveform ()) {
12971298 // Exit if no waveform is needed
@@ -1300,6 +1301,7 @@ void Clip::apply_waveform(std::shared_ptr<Frame> frame, std::shared_ptr<QImage>
13001301
13011302 // Get image from clip
13021303 std::shared_ptr<QImage> source_image = frame->GetImage ();
1304+ std::shared_ptr<QImage> background_canvas = background_frame->GetImage ();
13031305
13041306 // Debug output
13051307 ZmqLogger::Instance ()->AppendDebugMethod (
0 commit comments