xbmc/xbmc — pull request #4586 by alexmaloteaux (2014-04-22 17:03:05+00:00)
Title: [DTS-HD MA] Accurately detect channel number, bit depth, SR and LFE extended details

As ffmpeg do not parse extended substreams for dts-hd ma; this patch add a dts-hd ma header parser and extract the channel number; resolution, sampling rate and lfe presence.
If found the extended channel number will be used instead of the core one for Lisitem.audiochannels and videoplayer.audiochannels.
The other information are displayed on the video info osd when pressin O/Title. and used in some other places around the code

After writing the parser and testing, i noticed that ffmpeg correctly parse dts-hd HR; basically it means that there already is a full dts-hd ma parser in ffmpeg (didn't look)...... Maybe a more elegant way would have been to patch ffmpeg to expose the parser as a function and use it like this.... At least, like this it was fun to code and it works :)