Repository navigation
Wait for the PAT and PMT of a live source in PCR time - #59
Merged
Merged
Conversation
The PSI scan of a single-program live source read at most 4096 packets, which is 154 ms at 40 Mbit/s. An encoder that sends a PAT every 476 ms, within the 500 ms of ETSI TR 101 290, then failed most starts with "No PAT found at the start of the source". * On a live source, wait for the PAT up to 1 s of PCR time (kPsiWindowPcr), then for its PMT up to 1 s after the PAT. * Cap the single-program live scan, which keeps what it reads, at 106,400 packets (2 s at 80 Mbit/s, about 20 MB). A source without a PCR stops at that cap. * A program of a multiplex (timed windows) now also waits up to 1 s after the PAT for its PMT, where it stopped 1 s after the first PCR. Its 600,000-packet cap and stall error are unchanged. * Keep the 4096-packet scan for seekable files. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
moq2ts waits for the PAT and PMT of a live source in PCR time instead of a packet count. The scan read 4096 packets, 154 ms at 40 Mbit/s. An encoder that sends a PAT every 476 ms, within TR 101 290's 500 ms, failed two of three starts with "No PAT found at the start of the source". The PMT scan had the same limit, so a track could open without its PCR PID.
A live source now waits up to 1 s of PCR time for the PAT, then up to 1 s more for its PMT. A program in a multiplex gets the same PMT wait. I capped the single-program live scan at 106,400 packets. Files keep the 4096-packet scan.
In November 2026, a new 40 Mbit/s test failed on main, and all 21 unit tests passed. I can change the bounds if you prefer.
This change is