Fix flushing the final byte in the face of nothing but carry propagation.
authorTimothy B. Terriberry <tterribe@xiph.org>
Tue, 19 Feb 2008 08:29:32 +0000 (03:29 -0500)
committerJean-Marc Valin <jean-marc.valin@usherbrooke.ca>
Tue, 19 Feb 2008 09:54:49 +0000 (20:54 +1100)
libcelt/rangeenc.c

index 5353606..374ea16 100644 (file)
@@ -138,7 +138,7 @@ void ec_enc_done(ec_enc *_this){
     }
   }
   /*If we have a buffered byte flush it into the output buffer.*/
-  if(_this->rem>=0){
+  if(_this->rem>=0||_this->ext>0){
     ec_enc_carry_out(_this,0);
     _this->rem=-1;
   }