vlc | branch: master | Francois Cartegnie <[email protected]> | Mon Mar  9 
17:00:15 2015 +0100| [ab727f94736c1e34ee75d920689621e72ae080c9] | committer: 
Francois Cartegnie

codec: lpcm: reorder channels only after decoding (fix #14114)

24bit LPCM is packed and can't be reordered without introducing
clipping issues.

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

 modules/codec/lpcm.c |   14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/modules/codec/lpcm.c b/modules/codec/lpcm.c
index c317e6f..560d0d7 100644
--- a/modules/codec/lpcm.c
+++ b/modules/codec/lpcm.c
@@ -434,13 +434,6 @@ static block_t *DecodeFrame( decoder_t *p_dec, block_t 
**pp_block )
         p_block->p_buffer += p_sys->i_header_size + i_padding;
         p_block->i_buffer -= p_sys->i_header_size + i_padding;
 
-        if( p_sys->i_chans_to_reorder )
-        {
-            aout_ChannelReorder( p_block->p_buffer, p_block->i_buffer,
-                                 p_sys->i_chans_to_reorder, 
p_sys->pi_chan_table,
-                                 p_dec->fmt_out.i_codec );
-        }
-
         switch( p_sys->i_type )
         {
         case LPCM_WIDI:
@@ -457,6 +450,13 @@ static block_t *DecodeFrame( decoder_t *p_dec, block_t 
**pp_block )
             break;
         }
 
+        if( p_sys->i_chans_to_reorder )
+        {
+            aout_ChannelReorder( p_aout_buffer->p_buffer, 
p_aout_buffer->i_buffer,
+                                 p_sys->i_chans_to_reorder, 
p_sys->pi_chan_table,
+                                 p_dec->fmt_out.i_codec );
+        }
+
         block_Release( p_block );
         return p_aout_buffer;
     }

_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to