[vlc-commits] codec: lpcm: convert endianness for 16bits AOB

Francois Cartegnie git at videolan.org
Tue Mar 10 15:37:13 CET 2015


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Tue Mar 10 15:33:49 2015 +0100| [d5adfb2d1dbb98cc4680f77ff6e0bf2201a09c87] | committer: Francois Cartegnie

codec: lpcm: convert endianness for 16bits AOB

refs #11936 http://mpchc.omertabeyond.com/incorrect_audio_stream.AOB

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d5adfb2d1dbb98cc4680f77ff6e0bf2201a09c87
---

 modules/codec/lpcm.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/modules/codec/lpcm.c b/modules/codec/lpcm.c
index 560d0d7..63f3c7b 100644
--- a/modules/codec/lpcm.c
+++ b/modules/codec/lpcm.c
@@ -1146,8 +1146,9 @@ static void AobExtract( block_t *p_aout_buffer,
                     else
                     {
                         assert( i_bits == 16 );
-                        p_out[2*i_dst+0] = p_block->p_buffer[2*i_src+0];
-                        p_out[2*i_dst+1] = p_block->p_buffer[2*i_src+1];
+                        /* Big Endian -> Little Endian */
+                        p_out[2*i_dst+1] = p_block->p_buffer[2*i_src+0];
+                        p_out[2*i_dst+0] = p_block->p_buffer[2*i_src+1];
                     }
                 }
             }



More information about the vlc-commits mailing list