diff --git a/app/common/timerange.cpp b/app/common/timerange.cpp index 4595c993c..95a740761 100644 --- a/app/common/timerange.cpp +++ b/app/common/timerange.cpp @@ -291,6 +291,10 @@ TimeRangeListFrameIterator::TimeRangeListFrameIterator(const TimeRangeList &list index_(-1), size_(-1) { + if (!list_.isEmpty() && timebase_.isNull()) { + qCritical() << "TimeRangeListFrameIterator created with null timebase but non-empty list, this will likely lead to infinite loops"; + } + UpdateIndexIfNecessary(); } diff --git a/app/render/previewautocacher.cpp b/app/render/previewautocacher.cpp index 27b02e218..c4896f21c 100644 --- a/app/render/previewautocacher.cpp +++ b/app/render/previewautocacher.cpp @@ -500,7 +500,7 @@ void PreviewAutoCacher::TryRender() // If we're here, we must be able to render if (!invalidated_video_.isEmpty()) { - hash_iterator_ = TimeRangeListFrameIterator(invalidated_video_, viewer_node_->video_frame_cache()->GetTimebase()); + hash_iterator_ = TimeRangeListFrameIterator(invalidated_video_, viewer_node_->GetVideoParams().frame_rate_as_time_base()); for (int i=0; i