Skip to content

Commit c2c9f8b

Browse files
committed
🩹 raise when rate == 0
1 parent 05a80ba commit c2c9f8b

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/badapple/play.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ def play(
6464
nb_frames = capture.get(cv2.CAP_PROP_FRAME_COUNT)
6565
nb_frames = int(nb_frames + 0.5)
6666
rate = capture.get(cv2.CAP_PROP_FPS)
67+
if rate < 0.1:
68+
raise Exception("The frame rate is %s!" % str(rate))
6769
duration = nb_frames / rate
6870

6971
mo = max(int(0.5 + rate / fps), 1)

0 commit comments

Comments
 (0)