[xiph-commits] r13180 - trunk/Tremor

xiphmont at svn.xiph.org xiphmont at svn.xiph.org
Sat Jun 23 01:20:29 PDT 2007


Author: xiphmont
Date: 2007-06-23 01:20:29 -0700 (Sat, 23 Jun 2007)
New Revision: 13180

Modified:
   trunk/Tremor/codebook.c
Log:
Although not strictly a bug, decode_packed_entry_number() was not always 
forcing buffer eop correctly when it hit end of packet (as it was using 
look() not read())



Modified: trunk/Tremor/codebook.c
===================================================================
--- trunk/Tremor/codebook.c	2007-06-23 06:42:39 UTC (rev 13179)
+++ trunk/Tremor/codebook.c	2007-06-23 08:20:29 UTC (rev 13180)
@@ -171,8 +171,12 @@
 
   while(lok<0 && read>1)
     lok = oggpack_look(b, --read);
-  if(lok<0)return -1;
 
+  if(lok<0){
+    oggpack_adv(b,1); /* force eop */
+    return -1;
+  }
+
   /* bisect search for the codeword in the ordered list */
   {
     ogg_uint32_t testword=bitreverse((ogg_uint32_t)lok);



More information about the commits mailing list