diff --git a/codes/data/multi_frame_dataset.py b/codes/data/multi_frame_dataset.py index c8f14fe1..c82355c9 100644 --- a/codes/data/multi_frame_dataset.py +++ b/codes/data/multi_frame_dataset.py @@ -19,10 +19,9 @@ class MultiFrameDataset(BaseUnsupervisedImageDataset): frames_needed = self.num_frames search_idx = chunk_index while frames_needed > 0: - if source_name in self.chunk_name(search_idx): - frames_needed -= 1 - search_idx -= 1 - else: + frames_needed -= 1 + search_idx -= 1 + if source_name not in self.chunk_name(search_idx): search_idx += 1 break