This is the third time that `self.frames - current_frame` is calculated (the others being in line 622 and 624). I guess this is a code smell.