Merge branch 'master' into hashremoval

This commit is contained in:
itsmattkc
2022-05-21 19:18:59 -07:00
2 changed files with 7 additions and 2 deletions
+3
View File
@@ -152,6 +152,9 @@ void AudioVisualWaveform::OverwriteSums(const AudioVisualWaveform &sums, const r
int copy_len = their_arr.size() - their_start_index;
if (!length.isNull()) {
copy_len = qMin(copy_len, time_to_samples(length, rate_dbl));
if (copy_len == 0) {
continue;
}
}
// Determine end index of our array
+4 -2
View File
@@ -225,9 +225,11 @@ void ViewerOutput::InvalidateCache(const TimeRange& range, const QString& from,
// TEMP: Just to restore the intended functionality for now. This will be removed later.
if (from == kTextureInput) {
video_frame_cache()->Invalidate(range);
TimeRange r = range.Intersected(TimeRange(0, GetVideoLength()));
if (r.length() != 0) video_frame_cache()->Invalidate(r);
} else if (from == kSamplesInput) {
audio_playback_cache()->Invalidate(range);
TimeRange r = range.Intersected(TimeRange(0, GetAudioLength()));
if (r.length() != 0) audio_playback_cache()->Invalidate(r);
}
}