diff options
author | diego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2010-10-08 08:56:20 +0000 |
---|---|---|
committer | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2010-11-02 04:18:09 +0200 |
commit | 8b271d49ec6b723b026ee8c1e5156f6e0ff920ac (patch) | |
tree | ed603d2bafdafde1e618233af73ab7c5bcdd87f5 | |
parent | 374eb4f1886452039e643e2649fe7c1813fb64de (diff) | |
download | mpv-8b271d49ec6b723b026ee8c1e5156f6e0ff920ac.tar.bz2 mpv-8b271d49ec6b723b026ee8c1e5156f6e0ff920ac.tar.xz |
ao_coreaudio: byteswap AC-3 streams on little-endian
patch by Sean McGovern, gseanmcg gmail com
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32450 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r-- | libao2/ao_coreaudio.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libao2/ao_coreaudio.c b/libao2/ao_coreaudio.c index b98a5f5834..d4835e87ad 100644 --- a/libao2/ao_coreaudio.c +++ b/libao2/ao_coreaudio.c @@ -788,6 +788,10 @@ static int OpenSPDIF(void) #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, |