5.9.6
Fixed
Interlaced live H.264 with an inconclusive field-order probe now routes to the software deinterlace path (#150).
Some interlaced live H.264 channels are interlaced at the bitstream level (SPS frame_mbs_only_flag=0) but the demuxer's field-order probe returns UNKNOWN instead of a concrete TT/BB/TB/BT value. The #107 routing rule (interlaced H.264 goes software so bwdif can deinterlace it; tvOS AVPlayer does not deinterlace) only consulted the probe's field_order, so these channels silently stayed on native VideoToolbox decode and rendered with a persistent green colour cast from the first frame.
When the field-order probe is inconclusive, the routing decision now parses the SPS directly from codecpar extradata, accepting both layouts (Annex-B for MPEG-TS, avcC for MP4/MKV), and treats frame_mbs_only_flag=0 as interlaced.
Safety properties:
- A concrete
PROGRESSIVEprobe result still wins over the SPS capability flag; the probe analyzed actual frames, the SPS flag only says the stream may code interlaced pictures. - A false positive costs only an unnecessary software decode: the software decoder engages bwdif per frame from
AV_FRAME_FLAG_INTERLACED(slice headers), so progressive frames pass through untouched. - Missing or unparseable extradata classifies as not-interlaced and keeps the native path.
The fallback logs fieldOrder=UNKNOWN but SPS frame_mbs_only_flag=0; treating as interlaced for routing (#150) when it fires, so the dispatch decision is auditable from the host's log tap.
New API surface (source-compatible additions): H264SPS.frameMbsOnly(fromNAL:), H264SPS.spsNAL(fromExtradata:), VideoRoutingPolicy.spsIndicatesInterlaced(extradata:), and a defaulted spsIndicatesInterlaced: parameter on VideoRoutingPolicy.requiresSoftwarePath.
Covered by VideoRoutingPolicyTests and H264SPSTests (interlaced Main-profile 1920x1080 PAFF SPS fixture matching the reported channel). Full suite: 762 tests in 129 suites green.
Thanks to @digilearn-dev for the exemplary report, including the SPS-level comparison between the affected and a clean channel that pointed straight at the root cause.