mirror of
https://github.com/KrisKennaway/ii-vision.git
synced 2024-12-26 21:31:34 +00:00
Exit gracefully when running out of video frames
This commit is contained in:
parent
38663088ef
commit
5dcbca4aae
@ -53,7 +53,11 @@ class Movie:
|
|||||||
for au in self.audio.audio_stream():
|
for au in self.audio.audio_stream():
|
||||||
self.ticks += 1
|
self.ticks += 1
|
||||||
if self.video.tick(self.ticks):
|
if self.video.tick(self.ticks):
|
||||||
main, aux = next(video_frames)
|
try:
|
||||||
|
main, aux = next(video_frames)
|
||||||
|
except StopIteration:
|
||||||
|
break
|
||||||
|
|
||||||
if ((self.video.frame_number - 1) % self.every_n_video_frames
|
if ((self.video.frame_number - 1) % self.every_n_video_frames
|
||||||
== 0):
|
== 0):
|
||||||
print("Starting frame %d" % self.video.frame_number)
|
print("Starting frame %d" % self.video.frame_number)
|
||||||
|
Loading…
Reference in New Issue
Block a user