From bae7478ad8378d9bd776bee3ff7dd79179b9a7e4 Mon Sep 17 00:00:00 2001 From: ugai Date: Wed, 14 Sep 2022 00:12:21 +0900 Subject: [PATCH] fix smpte drop-frame validation to only reject if seconds is '00' --- vtc/_timecode_dropframe.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vtc/_timecode_dropframe.py b/vtc/_timecode_dropframe.py index ba1cc42..c3034b9 100644 --- a/vtc/_timecode_dropframe.py +++ b/vtc/_timecode_dropframe.py @@ -21,7 +21,8 @@ def _parse_drop_frame_adjustment( # skip on minutes not divisible by 10. has_bad_frame = sections.frames < drop_frames is_tenth_minute = sections.minutes % 10 == 0 or sections.minutes == 0 - if has_bad_frame and not is_tenth_minute: + is_first_second = sections.seconds == 0 + if has_bad_frame and not is_tenth_minute and is_first_second: raise ValueError( f"drop-frame tc cannot have a frames value of less than {drop_frames} on " f"minutes not divisible by 10, found '{sections.frames}'",