xbmc/xbmc — pull request #5442 by popcornmix (2014-10-02 15:02:19+00:00)
Title: [omxplayer] Fix bad audio when sample_fmt is not reported on Open

For most codecs ffmpeg reports m_pCodecContext->sample_fmt on the avcodec_open2 call (e.g. ac3, dts, aac).
However some (PCM on dvd) report AV_SAMPLE_FMT_NONE on open, and only provide the correct format on decode.

This can cause the GetBitsPerSample call to change between open and decode and results in white noise when the word size is misinterpreted.

The simple solution is to always convert to float when open doesn't report the format and ensure GetBitsPerSample reports this value