4.0.2 — DTS-HD Master Audio lossless XLL restored
Fixed
DTS-HD Master Audio lost its lossless XLL extension in FLAC bridge mode (#66)
The 4.0.1 fix routed every DTS source through the dca_core bitstream filter, stripping each packet to its lossy DTS core before the decoder. For DTS-HD MA streams that decode the full lossless XLL cleanly, that downgraded .lossless (FLAC) output to lossy 5.1, audible for hosts bridging to a multichannel-LPCM AVR.
The bridge now decodes the full stream again:
- DTS-HD MA reconstructs its lossless XLL extension (S32P), re-encoded bit-perfectly to FLAC in
.losslessmode (lossy EAC3 in.surroundCompat, as before). - The per-packet
EINVALskip is kept; it is the real fix for the rare residual-XLL-without-core frame (#64), independent of the bitstream filter. - The resampler input format is now re-derived from each decoded frame (the canonical libswresample contract, matching the software audio decoder), so a stream whose
sample_fmtwas unresolved at decoder open, or a bailed live probe, can no longer misread the decoded samples as the seed format.
The dca_core bitstream filter is no longer used, so no FFmpegBuild change is required (the dca decoder is unaffected).
Compatibility
Patch release, no public API change. Drop-in for any 4.0.x adopter.
Acknowledgements
Thanks to @rrgomes for the precise report and root-cause analysis.
The full DTS decode then FLAC re-encode path is verified end-to-end on plain DTS. DTS-HD MA bit-perfectness holds by construction (the decoder reconstructs the lossless XLL as S32P, which FLAC preserves) but cannot be synthesized into an offline fixture, so confirmation on real DTS-HD MA discs is very welcome.