Fixed a bug with cropping logic on Clip (disabled it temporarily). I need to replace the Crop functionality with a more robust cropping tool. Also, updated Timeline to use the MaxWidth/MaxHeight settings when calling the clip (since those are set when the screen is resized).

This commit is contained in:
Jonathan Thomas
2020-08-26 22:47:31 -05:00
committed by FeRD (Frank Dana)
parent eb328f1190
commit 6da4e8fded
3 changed files with 37 additions and 15 deletions

View File

@@ -441,7 +441,7 @@ std::shared_ptr<Frame> Timeline::GetOrCreateFrame(Clip* clip, int64_t number)
// Attempt to get a frame (but this could fail if a reader has just been closed)
#pragma omp critical (T_GetOtCreateFrame)
new_frame = std::shared_ptr<Frame>(clip->GetFrame(number, info.width, info.height, samples_in_frame));
new_frame = std::shared_ptr<Frame>(clip->GetFrame(number, Settings::Instance()->MAX_WIDTH, Settings::Instance()->MAX_HEIGHT, samples_in_frame));
// Return real frame
return new_frame;
@@ -740,7 +740,7 @@ std::shared_ptr<Frame> Timeline::GetFrame(int64_t requested_frame)
int samples_in_frame = Frame::GetSamplesPerFrame(frame_number, info.fps, info.sample_rate, info.channels);
// Cache clip object
clip->GetFrame(clip_frame_number, info.width, info.height, samples_in_frame);
clip->GetFrame(clip_frame_number, Settings::Instance()->MAX_WIDTH, Settings::Instance()->MAX_HEIGHT, samples_in_frame);
}
}
}