summaryrefslogtreecommitdiff
path: root/src/lib/openjp2/mqc.c
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2017-07-26 21:39:50 +0200
committerEven Rouault <even.rouault@spatialys.com>2017-07-26 21:43:32 +0200
commit94c4b7300cc515330bf798bb45eb0d68e2c84aa0 (patch)
tree4059448090f1fa81c48d21c7addd5abaab721ea3 /src/lib/openjp2/mqc.c
parent5e795d90a1e47616e0c7a2e39381c13ccf7fd6dd (diff)
T1 decoder: check code stream errors when predictable termination is enabled and emit a warning when errors are found
Diffstat (limited to 'src/lib/openjp2/mqc.c')
-rw-r--r--src/lib/openjp2/mqc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lib/openjp2/mqc.c b/src/lib/openjp2/mqc.c
index 5c1fe799..8f69e29e 100644
--- a/src/lib/openjp2/mqc.c
+++ b/src/lib/openjp2/mqc.c
@@ -300,6 +300,7 @@ void opj_mqc_init_enc(opj_mqc_t *mqc, OPJ_BYTE *bp)
assert(*(mqc->bp) != 0xff);
mqc->start = bp;
+ mqc->end_of_byte_stream_counter = 0;
}
void opj_mqc_encode(opj_mqc_t *mqc, OPJ_UINT32 d)
@@ -513,6 +514,7 @@ void opj_mqc_init_dec(opj_mqc_t *mqc, OPJ_BYTE *bp, OPJ_UINT32 len,
/* See https://github.com/uclouvain/openjpeg/issues/921 */
opj_mqc_init_dec_common(mqc, bp, len, extra_writable_bytes);
opj_mqc_setcurctx(mqc, 0);
+ mqc->end_of_byte_stream_counter = 0;
if (len == 0) {
mqc->c = 0xff << 16;
} else {