diff --git a/main.py b/main.py index 5c39ec6..cb6750a 100644 --- a/main.py +++ b/main.py @@ -675,14 +675,9 @@ class MediaGrader: # Advance to next frame in this segment self.segment_current_frames[i] += 1 - # Get the segment boundaries - start_frame = self.segment_positions[i] - end_frame = self.segment_end_positions[i] - - # Loop within the segment bounds - if self.segment_current_frames[i] > end_frame: - # Loop back to start of segment - self.segment_current_frames[i] = start_frame + # Loop over the entire video, starting from the segment's initial position + if self.segment_current_frames[i] >= self.total_frames: + self.segment_current_frames[i] = 0 # Ensure we don't go beyond the video cache if self.segment_current_frames[i] < len(self.video_frame_cache):