avcodec/jpeg2000dec: Add placeholder for PLT parsing
authorMichael Niedermayer <michaelni@gmx.at>
Tue, 9 Jun 2015 13:16:46 +0000 (15:16 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 9 Jun 2015 13:16:46 +0000 (15:16 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/jpeg2000dec.c

index c5a3bd2..aecc6eb 100644 (file)
@@ -673,6 +673,22 @@ static uint8_t get_tlm(Jpeg2000DecoderContext *s, int n)
     return 0;
 }
 
+static uint8_t get_plt(Jpeg2000DecoderContext *s, int n)
+{
+    int i;
+
+    av_log(s->avctx, AV_LOG_ERROR,
+            "PLT marker at pos 0x%X\n", bytestream2_tell(&s->g) - 4);
+
+    /*Zplt =*/ bytestream2_get_byte(&s->g);
+
+    for (i = 0; i < n - 3; i++) {
+        bytestream2_get_byte(&s->g);
+    }
+
+    return 0;
+}
+
 static int init_tile(Jpeg2000DecoderContext *s, int tileno)
 {
     int compno;
@@ -1469,6 +1485,10 @@ static int jpeg2000_read_main_headers(Jpeg2000DecoderContext *s)
             // Tile-part lengths
             ret = get_tlm(s, len);
             break;
+        case JPEG2000_PLT:
+            // Packet length, tile-part header
+            ret = get_plt(s, len);
+            break;
         default:
             av_log(s->avctx, AV_LOG_ERROR,
                    "unsupported marker 0x%.4"PRIX16" at pos 0x%X\n",