summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMonty <xiphmont@xiph.org>2007-06-23 08:20:29 +0000
committerMonty <xiphmont@xiph.org>2007-06-23 08:20:29 +0000
commit8822f86214bd7ad682d5d7c61646603befeee635 (patch)
tree0d41d8e3a22c867a93db105f349fdf1656700d64
parentab1af8d4640cd5d2e8b142f5b16d5f04843213f2 (diff)
downloadtremor-8822f86214bd7ad682d5d7c61646603befeee635.tar.gz
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()) git-svn-id: https://svn.xiph.org/trunk/Tremor@13180 0101bb08-14d6-0310-b084-bc0e0c8e3800
-rw-r--r--codebook.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/codebook.c b/codebook.c
index a5b7ffa..18d5a50 100644
--- a/codebook.c
+++ b/codebook.c
@@ -171,7 +171,11 @@ STIN long decode_packed_entry_number(codebook *book,
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 */
{