]> git.sesse.net Git - vlc/commitdiff
faad decoder: fix decoding with some samples
authorRafaël Carré <funman@videolan.org>
Tue, 4 Jun 2013 12:45:16 +0000 (14:45 +0200)
committerRafaël Carré <funman@videolan.org>
Tue, 4 Jun 2013 19:11:46 +0000 (21:11 +0200)
modules/codec/faad.c

index 664ce0e3ff6ba235c90f38779171784da6ee831c..6aba91313660dc3814e9dc0e2ccc13cd6daf720d 100644 (file)
@@ -325,10 +325,11 @@ static block_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
         {
             msg_Warn( p_dec, "%s", faacDecGetErrorMessage( frame.error ) );
 
-            if( frame.error == 21 )
+            if( frame.error == 21 || frame.error == 12 )
             {
                 /*
-                 * Once an "Unexpected channel configuration change" error
+                 * Once an "Unexpected channel configuration change"
+                 * or a "Invalid number of channels" error
                  * occurs, it will occurs afterwards, and we got no sound.
                  * Reinitialization of the decoder is required.
                  */