[vlc-commits] faad decoder: fix decoding with some samples

Rafaël Carré git at videolan.org
Tue Jun 4 21:12:23 CEST 2013


vlc | branch: master | Rafaël Carré <funman at videolan.org> | Tue Jun  4 14:45:16 2013 +0200| [d42a6172b9281978cda196185523d6081db18697] | committer: Rafaël Carré

faad decoder: fix decoding with some samples

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

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

diff --git a/modules/codec/faad.c b/modules/codec/faad.c
index 664ce0e..6aba913 100644
--- a/modules/codec/faad.c
+++ b/modules/codec/faad.c
@@ -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.
                  */



More information about the vlc-commits mailing list