Skip to content

5.18.1

Choose a tag to compare

@superuser404notfound superuser404notfound released this 21 Jul 18:01

Three live-path fixes from the #168 investigation, all reported with field-verified designs by @kskchaitanya1993 (#177).

Fixed

  • Live HLS ingest: bounded parallel segment prefetch. The ingest segment loop awaited each fetch fully before starting the next, so every segment paid a connection + TTFB round-trip with no bytes flowing; on a 4K50 HEVC/TS stream (~13 Mbps) the producer ran below real time (segment cache stuck at ~5) even on links that can pull much faster. Up to 4 fetches (and AES-128 decrypts) now run in flight, committed to the FIFO strictly in playlist order, so classification, discontinuity handling, and demuxer pacing are unchanged while the link is saturated. Covered by Issue177IngestPrefetchTests.

  • Live no-cut watchdog: slow-but-healthy streams are no longer force-retuned. The watchdog retuned on wall-clock since the last finalized segment alone; a source delivering just below real time (a 6 s segment that has not fully arrived inside the 10 s timeout while video PTS keeps advancing) was classified a cutter wedge and retuned, re-joining behind the live edge and draining the buffer each cycle. The wedge classification is now gated on PTS advance: at least 2 s of video PTS advance in the window holds and re-arms the watchdog (bounded to 6 consecutive holds) instead of exiting for host retune. A genuine SSAI ad-pod wedge (full read rate, frozen video PTS) still retunes immediately, and the 5.17.4 halt-latch / 503 behavior is preserved. Covered by Issue177NoCutHoldTests.

  • Software decode path: anamorphic content no longer collapses to a thin strip. AVSampleBufferDisplayLayer reads display aspect from the CMVideoFormatDescription PAR extension, but the renderer's format-description cache key omitted PAR, freezing whatever the first frame carried for the whole stream; garbage AVCodecContext SARs (1088:1 seen in the field) and per-field oscillation on interlaced content had no gate. The decoder now resolves SAR frame -> codec context -> stream (first sane value wins, both axes gated to 1...256), latches the first non-square SAR per stream, and the renderer keys its format-description cache on PAR. Covered by Issue177SARLatchTests.

Verification

924/924 tests pass; strict-concurrency build and iOS/tvOS Simulator builds clean.