I have found a saved TS stream from an HD channel that changes the audio config from 2.0 to 5.1, and it seem to work OK still with your patch, as well as fixing playback of the affected MOV files. Also, reviewing the patch suggests that the only effective change in behaviour is that a closed stream will be reopened when the configuration changes. So I have now pushed it.


From: Torsten Jager <>
To: Chris Rankin <>
Sent: Wednesday, 27 March 2013, 17:30
Subject: Re: AAC 5.1 audio is broken in xine-lib-1.2

> Hmm, is your patch going to affect DVB TS streams, e.g. from a HDTV
> channel? Some HDTV channels broadcast 2.0 sound for one program, followed by 5.1
> sound for another. Or possibly interrupt a movie with 5.1 sound to show
> commercials with 2.0 sound.

I only changed the startup behaviour.
Audio out was opened with bogus settings (1Hz != 0) which failed.
This prevented a retry after first audio frame came in and corrected
the settings (48k/6 channels).
Once ao _is_ open successfully, everything works same as before,
including further stream conf changes.