jpeg2000dec: fix ff_mqc_initdec() and data setup order
authorMichael Niedermayer <michaelni@gmx.at>
Thu, 30 May 2013 17:54:59 +0000 (19:54 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Fri, 31 May 2013 00:22:10 +0000 (02:22 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/jpeg2000dec.c

index c0bbc09..a276a09 100644 (file)
@@ -884,9 +884,9 @@ static int decode_cblk(Jpeg2000DecoderContext *s, Jpeg2000CodingStyle *codsty,
     for (y = 0; y < height + 2; y++)
         memset(t1->flags[y], 0, (width + 2) * sizeof(width));
 
-    ff_mqc_initdec(&t1->mqc, cblk->data);
     cblk->data[cblk->length]     = 0xff;
     cblk->data[cblk->length + 1] = 0xff;
+    ff_mqc_initdec(&t1->mqc, cblk->data);
 
     while (passno--) {
         switch (pass_t) {