SRT writer caps every cue at 5 seconds

Open Beginner friendly
#78 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
65/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
macos, swift
Domain
backend

Research direction

Find SRT.fixEndTimestamp and trace how it distinguishes supplied end times from unknown ones, including how it adjusts an end against the next cue. Check the timestamp handling tests, if present, and add coverage for supplied long end times, unknown end times, and overlapping cues. Done when real end times are preserved, the 5-second default applies only to unknown ends, and clamping never puts an end before its start.

Written by the indexing model from the issue text.

Description

bug

SRT.fixEndTimestamp clamps every end time to start + 5, even when the stream supplied the real end time (PGS clear display set, VobSub stop command, DVB timeout). Long captions, signs and lyrics are cut short. It also forces a 100 ms gap before the next cue, and if cues overlap the end can land before the start.

Fix: only apply the 5 s default when the end time is unknown; when clamping to the next cue, never go below the start time.

Dominant language
Swift
Stars
42
Forks
9
Avg merge
9h 30m
Merged PRs (30d)
4

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from ecdye/macSubtitleOCR

All issues in ecdye/macSubtitleOCR

Similar issues

More Swift issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.