diff libao2/ao_coreaudio.c @ 32364:d9c8f66f77e1

AC-3 streams need to be byteswapped on little-endian machines. patch by Sean McGovern, gseanmcg gmail com
author diego
date Fri, 08 Oct 2010 08:56:20 +0000
parents 4f17ff5b3cbc
children 8fa2f43cb760
line wrap: on
line diff
--- 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,