shithub: opus

Download patch

ref: 50ef21c0a9dc7e56e6ca8c00b50afae2f9fedc99
parent: 331e9fe0fd37597908279f58e56065b7aedae699
author: Jean-Marc Valin <[email protected]>
date: Tue Sep 6 11:19:04 EDT 2011

Making redundancy length decoding errors non-fatal

--- a/src/opus_decoder.c
+++ b/src/opus_decoder.c
@@ -323,9 +323,11 @@
             	}
             }
             len -= redundancy_bytes;
-            if (len<0) {
-               RESTORE_STACK;
-               return OPUS_INVALID_PACKET;
+            if (len<0)
+            {
+               len=0;
+               redundancy_bytes=0;
+               redundancy = 0;
             }
             /* Shrink decoder because of raw bits */
             dec.storage -= redundancy_bytes;