# HG changeset patch # User diego # Date 1286528180 0 # Node ID d9c8f66f77e1933d183025bb109b4d26b977fa43 # Parent d18d208c2cc907406d462c6c6084ae6d4e7d8888 AC-3 streams need to be byteswapped on little-endian machines. patch by Sean McGovern, gseanmcg gmail com diff -r d18d208c2cc9 -r d9c8f66f77e1 libao2/ao_coreaudio.c --- a/libao2/ao_coreaudio.c Fri Oct 08 01:17:54 2010 +0000 +++ b/libao2/ao_coreaudio.c Fri Oct 08 08:56:20 2010 +0000 @@ -788,6 +788,10 @@ #if HAVE_BIGENDIAN if (!(ao->stream_format.mFormatFlags & kAudioFormatFlagIsBigEndian)) #else + /* tell mplayer that we need a byteswap on AC3 streams, */ + if (ao->stream_format.mFormatID & kAudioFormat60958AC3) + ao_data.format = AF_FORMAT_AC3_LE; + if (ao->stream_format.mFormatFlags & kAudioFormatFlagIsBigEndian) #endif ao_msg(MSGT_AO, MSGL_WARN,