Skip to content

Commit 68e6d11

Browse files
committed
Fix index error in case of too short TCs
1 parent 1afdb05 commit 68e6d11

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pytimecode.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def __init__(self, framerate, start_timecode=None, frames=None, drop_frame=False
2222
self.framerate = framerate
2323
self.int_framerate = self.set_int_framerate()
2424
self.drop_frame = drop_frame
25-
if start_timecode and drop_frame and start_timecode[8] != ';':
25+
if start_timecode and drop_frame and len(start_timecode) > 8 and start_timecode[8] != ';':
2626
raise ValueError("If drop_frame is True and a start timecode is specified, the tc must use drop frame format.")
2727
self.iter_return = iter_return
2828
self.hrs = None

0 commit comments

Comments
 (0)