xbmc/xbmc — pull request #3152 by herrnst (2013-08-25 18:13:12+00:00)
Title: paplayer/DVDPlayerCodec: prevent multiple Init() runs using an init-bool, fixes playback of DTS-WAV via paplayer (closes #14405)

Sometime around the ffmpeg-1.2 bump, DTS-WAV playback broke in a way that only noise was played when trying to play back WAV files containing DTS-encoded audio, using paplayer. In http://trac.xbmc.org/ticket/14405 this was worked around by removing the call to DVDPlayerCodec::Init(). Indeed, multiple calls to Init() are placed, which seems to screw up things somewhere. This patch/PR adds a flag which tracks if Init() was called before and so prevents multiple initialisations of things, effectively fixing DTS-WAV playback.

Should be tested with SPDIF/HDMI passthrough, I was only able to test using stereo downmix (ffmpeg/libdca decode).

Closes trac ticket #14405.