[vlc-commits] codec: faad: extract subset from higher number of channels

Francois Cartegnie git at videolan.org
Mon Feb 27 23:08:22 CET 2017


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Mon Feb 27 21:53:51 2017 +0100| [0add92ddc7a7cb8b7d8ee0f6dcc9bbc3544cf8cf] | committer: Francois Cartegnie

codec: faad: extract subset from higher number of channels

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

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

diff --git a/modules/codec/faad.c b/modules/codec/faad.c
index 938424d..d8a3a0f 100644
--- a/modules/codec/faad.c
+++ b/modules/codec/faad.c
@@ -394,16 +394,18 @@ static int DecodeBlock( decoder_t *p_dec, block_t *p_block )
             return VLCDEC_SUCCESS;
         }
 
-        if( frame.channels <= 0 || frame.channels > 8 || frame.channels == 7 )
+        if( frame.channels == 0 || frame.channels >= 64 )
         {
             msg_Warn( p_dec, "invalid channels count: %i", frame.channels );
             FlushBuffer( p_sys, frame.bytesconsumed );
-            date_Set( &p_sys->date, VLC_TS_INVALID );
-            p_sys->b_discontinuity = true;
-            return VLCDEC_SUCCESS;
+            if( frame.channels == 0 )
+            {
+                p_sys->b_discontinuity = true;
+                return VLCDEC_SUCCESS;
+            }
         }
 
-        if( frame.samples <= 0 )
+        if( frame.samples == 0 )
         {
             msg_Warn( p_dec, "decoded zero sample" );
             FlushBuffer( p_sys, frame.bytesconsumed );



More information about the vlc-commits mailing list