[vlc-commits] codec: faad: don't reorder with random table

Francois Cartegnie git at videolan.org
Fri Dec 8 16:51:50 CET 2017


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Fri Dec  8 16:47:56 2017 +0100| [790d6b1f5437b1307c831e6ac509baa40d69e3fd] | committer: Francois Cartegnie

codec: faad: don't reorder with random table

heap buffer ofw on no reorder

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

 modules/codec/faad.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/modules/codec/faad.c b/modules/codec/faad.c
index 30b5ac20fe..0b7491d6a6 100644
--- a/modules/codec/faad.c
+++ b/modules/codec/faad.c
@@ -525,7 +525,7 @@ static int DecodeBlock( decoder_t *p_dec, block_t *p_block )
             else pi_faad_channels_positions[i] = 0;
         }
 
-        aout_CheckChannelReorder( pi_faad_channels_positions, NULL,
+        bool b_reorder = aout_CheckChannelReorder( pi_faad_channels_positions, NULL,
                                   p_dec->fmt_out.audio.i_physical_channels, pi_neworder_table );
 
 
@@ -546,9 +546,10 @@ static int DecodeBlock( decoder_t *p_dec, block_t *p_block )
                 memset( p_out->p_buffer, 0, p_out->i_buffer );
 
             /* FIXME: replace when aout_channel_reorder can take samples from a different buffer */
-            DoReordering( (uint32_t *)p_out->p_buffer, samples,
-                          frame.samples / frame.channels, frame.channels,
-                          pi_neworder_table );
+            if( b_reorder )
+                DoReordering( (uint32_t *)p_out->p_buffer, samples,
+                              frame.samples / frame.channels, frame.channels,
+                              pi_neworder_table );
 
             if( p_sys->b_discontinuity )
             {



More information about the vlc-commits mailing list