]> git.sesse.net Git - vlc/commitdiff
codec: lpcm: convert endianness for 16bits AOB
authorFrancois Cartegnie <fcvlcdev@free.fr>
Tue, 10 Mar 2015 14:33:49 +0000 (15:33 +0100)
committerFrancois Cartegnie <fcvlcdev@free.fr>
Tue, 10 Mar 2015 14:36:09 +0000 (15:36 +0100)
refs #11936 http://mpchc.omertabeyond.com/incorrect_audio_stream.AOB

modules/codec/lpcm.c

index 560d0d7d00e57f1c67bfdf9795e6921596bd94ea..63f3c7b02530aef7757e4f99e9468790a4037930 100644 (file)
@@ -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];
                     }
                 }
             }