j2kdec: prog_order reading from jpeg2000dec
authorMichael Niedermayer <michaelni@gmx.at>
Sun, 26 May 2013 11:33:10 +0000 (13:33 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 26 May 2013 11:57:56 +0000 (13:57 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/j2kdec.c

index f4b7e3e..c9322a5 100644 (file)
@@ -330,9 +330,10 @@ static int get_cod(Jpeg2000DecoderContext *s, Jpeg2000CodingStyle *c, uint8_t *p
 
     tmp.csty = bytestream2_get_byteu(&s->g);
 
-    if (bytestream2_get_byteu(&s->g)){ // progression level
+    // get progression order
+    tmp.prog_order = bytestream_get_byte(&s->g);
+    if (tmp.prog_order){
         av_log(s->avctx, AV_LOG_ERROR, "only LRCP progression supported\n");
-        return -1;
     }
 
     tmp.nlayers = bytestream2_get_be16u(&s->g);