summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntonin Descampe <antonin@gmail.com>2004-07-21 05:18:57 +0000
committerAntonin Descampe <antonin@gmail.com>2004-07-21 05:18:57 +0000
commit9fa68ca8111c83ebac19718530328bd5c0700820 (patch)
tree8a5de671da8ddfad58332d1ac3af3a11af393372
parentd38080aa00f777a5e7e6788941b945b52f1b9219 (diff)
Bug fixed in MQ decoder initialization (keyword comment : initbug1)
-rw-r--r--libopenjpeg/mqc.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libopenjpeg/mqc.c b/libopenjpeg/mqc.c
index 511284ce..31adc845 100644
--- a/libopenjpeg/mqc.c
+++ b/libopenjpeg/mqc.c
@@ -536,7 +536,10 @@ void mqc_init_dec(unsigned char *bp, int len)
mqc_start = bp;
mqc_end = bp + len;
mqc_bp = bp;
- mqc_c = *mqc_bp << 16;
+ //add antonin initbug1
+ if (len==0) mqc_c = 0xff << 16;
+ else mqc_c = *mqc_bp << 16;
+ //dda
mqc_bytein();
mqc_c <<= 7;
mqc_ct -= 7;