Skip to content

fix(hls): private PES registered as HEVC takes the #268 VOD ingest - #723

Merged
superuser404notfound merged 1 commit into
mainfrom
fix/718-hevc-registration-descriptor
Oct 8, 2026
Merged

superuser404notfound merged 1 commit into
mainfrom
fix/718-hevc-registration-descriptor

Conversation

@superuser404notfound

Copy link
Copy Markdown
Owner

Refs #718

MPEGTransportStreamCodecProbe only accepted PMT stream_type 0x24 as HEVC and skipped every ES descriptor loop. A finite HEVC-in-MPEG-TS VOD that declares its video as private PES (0x06) plus registration_descriptor("HEVC") therefore stayed on the native route, where AVFoundation builds no video track.

  • 0x06 counts as HEVC only when its ES_info loop carries a well-formed registration descriptor (tag 0x05, length >= 4, format identifier HEVC).
  • A descriptor or ES_info loop that runs past its bounds is not evidence; the registration never reinterprets other stream types (0x1B + HEVC stays otherCarriage).
  • FFmpeg's mpegts demuxer already maps the registration to HEVC, so the ingest itself needs no change.

Verification

  • New unit cases: accepted (alone, behind an unrelated descriptor), rejected (no descriptor, other identifier, HEVC bytes under another tag, short registration, descriptor longer than its loop, loop longer than the section, 0x1B). The accept cases fail without the fix.
  • aetherctl play on a byte-matched twin of hls-hevc-vod-offset (PMT 0x24 patched to 0x06, CRC rewritten), seeks to 90 s and 30 s: before, native route with rfd=n throughout; after, AE#268: finite HEVC-in-MPEG-TS HLS route with rfd=y, telemetry identical to the 0x24 original.
  • Full swift test: green apart from Issue445VMRegionCensusTests, a memory accounting test that fails under full-suite load and passes on its own.

🤖 Generated with Claude Code

https://claude.ai/code/session_01WJcXkGQrMiBPixVEFTSBJS

The carriage probe only accepted PMT stream_type 0x24 as HEVC and skipped every
ES descriptor loop, so a finite HEVC-in-MPEG-TS VOD that declares its video as
private PES (stream_type 0x06) plus registration_descriptor("HEVC") stayed on the
native route, where AVFoundation builds no video track (0x0 dimensions).

stream_type 0x06 now counts as HEVC when its ES_info loop carries a well-formed
registration descriptor (tag 0x05, at least four bytes, format identifier "HEVC").
A descriptor or loop that runs past its own bounds is not evidence, and the
registration never reinterprets any other stream type. FFmpeg's mpegts demuxer
already maps that registration to HEVC, so the ingest needs nothing else.

Verified with aetherctl on a byte-matched twin of the offset fixture (PMT 0x24
patched to 0x06, CRC rewritten): before, native route with no displayable frame;
after, the AE#268 route with frames and seeks to 90 s and 30 s landing exactly
like the 0x24 original.

Refs #718

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WJcXkGQrMiBPixVEFTSBJS
@superuser404notfound
superuser404notfound merged commit e91b1f3 into main Oct 8, 2026
3 of 4 checks passed
@superuser404notfound
superuser404notfound deleted the fix/718-hevc-registration-descriptor branch October 13, 2026 06:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant