changeset 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 d18d208c2cc9
children 5ce38803316e
files libao2/ao_coreaudio.c
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
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,