aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-06-09 15:16:46 +0200
committerMichael Niedermayer <michaelni@gmx.at>2015-06-09 15:16:46 +0200
commit45db92180693b0a4663bc4c30ada0af1da041558 (patch)
tree219ec64a12a914bdd3f9d695c74ad0d835524611
parentb6ee1912f98d1db5f31b5d0c182181b79d9233df (diff)
downloadffmpeg-45db92180693b0a4663bc4c30ada0af1da041558.tar.gz
avcodec/jpeg2000dec: Add placeholder for PLT parsing
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/jpeg2000dec.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/libavcodec/jpeg2000dec.c b/libavcodec/jpeg2000dec.c
index c5a3bd26e6..aecc6ebe02 100644
--- a/libavcodec/jpeg2000dec.c
+++ b/libavcodec/jpeg2000dec.c
@@ -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",