Repository navigation
fix(demux): reconstruct clamped Matroska H264 timestamps - #762
superuser404notfound merged 2 commits into
Conversation
Co-Authored-By: OpenAI Codex <[email protected]>
Co-Authored-By: OpenAI Codex <[email protected]>
…es (#762) The clamped-CFR verdict and its rewriter derived PTS from picture order and DTS from decode order without checking that one does not precede the other. A stream whose ranks lag their decode index by more than the reorder delay would have been handed out with PTS < DTS. Both now fail closed on that, the verdict back to the previous path and the rewriter to untouched packets. Also covers the path #762 changed for #511 files: a coding-order ladder on a whole-tick lattice still classifies as a permutation, not a reconstruction. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01WJcXkGQrMiBPixVEFTSBJS
8b976ab
into
superuser404notfound:main
|
Thank you @oxyc, this is merged in 8b976ab. A very clean contribution: fail closed throughout, a numeric fixture, and a reproducer that took one command to build. Merge: the only conflict was Verification on the merged tree:
The healthy twin reads 25 on both builds, so the head-of-stream hold for whole-tick CFR candidates costs nothing measurable. Follow-up a65688e (mine, on top):
Two things I left as they are, in case your asset can answer them:
Not released yet; it goes out with the next AetherEngine release. |
|
CFRRewriter has a private initializer |
|
Follow-up for @ijuniorfu's note above: |
Summary
Reconstruct clamped timestamps in narrowly identified CFR H.264 Matroska streams. The affected files contain duplicated timestamp slots and missing CFR slots,
producing alternating 0 ms / 80 ms presentation intervals in 25 fps video.
What changed
Test plan
Device / OS: Apple TV 4K (3rd generation, AppleTV14,1), tvOS 27.0 (24J361)
Source media (container / video codec + profile / audio / HDR-DV): Matroska, 1920×1080 at 25 fps / H.264 [email protected] / AC-3 48 kHz stereo / SDR
Result: The affected stream changed from persistent alternating 0 ms / 80 ms decoded-frame intervals to a steady 40 ms cadence and was visually smooth. Native
playback requested 25 fps on the 50 Hz display with no rebuffering.
Reproducer: synthetic 25 fps H.264 Matroska fixture, with packets 3 and 7 clamped one frame forward to create duplicate and
missing timestamp slots.
Focused tests: all 13 Matroska timestamp tests pass.
Full suite: 4,347 of 4,348 tests pass. One unrelated slow-peer networking test timed out twice.
Build the synthetic fixture with FFmpeg
Checklist