shithub: opus

Download patch

ref: 4e955ed3794f37c91a699e25b97de71cb08077ad
parent: 7365c7d1b63a4b44505a69e08ad18267223e3612
author: Timothy B. Terriberry <[email protected]>
date: Tue Dec 21 11:36:31 EST 2010

Fix a typo in ec_byte_write_done().

Introduced by 30df6cf3.
This should have only affected the output in the case where the last
 few extra bits caused us to bust, and wouldn't have prevented us
 from detecting the error.

--- a/libcelt/entenc.c
+++ b/libcelt/entenc.c
@@ -76,7 +76,7 @@
          would corrupt the range coder data, and that's more important.*/
       if(_start_bits_available<_end_bits_used){
         _end_bits_used=_start_bits_available;
-        _end_byte&=(1<_start_bits_available)-1;
+        _end_byte&=(1<<_start_bits_available)-1;
         ret=-1;
       }
     }