shithub: opus

Download patch

ref: 649d5cc23bfd3ecd6198068e509fc2e882fa1488
parent: b35536a3b0c9d2ae27e93ff0476b703404d4eb2b
author: tterribe <tterribe@0101bb08-14d6-0310-b084-bc0e0c8e3800>
date: Thu Jan 17 02:51:18 EST 2008

Update ec_dec_bits64() to correspond to the new ec_enc_bits64(). Not sure why this wasn't committed before.

git-svn-id: http://svn.xiph.org/trunk/ghost@14409 0101bb08-14d6-0310-b084-bc0e0c8e3800

--- a/libentcode/entdec.c
+++ b/libentcode/entdec.c
@@ -97,13 +97,13 @@
 }
 
 ec_uint64 ec_dec_bits64(ec_dec *_this,int _ftb){
-  ec_uint64 t;
+  ec_uint32 t;
   if(_ftb>32){
-    t=ec_dec_bits(_this,32);
-    _ftb-=32;
+    t=ec_dec_bits(_this,_ftb-32);
+    _ftb=32;
   }
   else t=0;
-  return t<<_ftb|ec_dec_bits(_this,_ftb);
+  return (ec_uint64)t<<32|ec_dec_bits(_this,_ftb);
 }
 
 ec_uint32 ec_dec_uint(ec_dec *_this,ec_uint32 _ft){