Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix smpte drop-frame validation to only reject if seconds is '00' #15

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion vtc/_timecode_dropframe.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}'",
Expand Down