libavcodec/jpeg2000dec: Support for Parameterless Markers

The JPEG2000 standard reserves marker values 0xFF30
to 0xFF3F to be used as parameterless markers. This
patch adds support to decode codestream with such
markers. This allows decoding of p0_02.j2k.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
pull/345/head
Gautam Ramakrishnan 5 years ago committed by Michael Niedermayer
parent 489c5db079
commit e39490615f
  1. 3
      libavcodec/jpeg2000dec.c

@ -2092,7 +2092,8 @@ static int jpeg2000_read_main_headers(Jpeg2000DecoderContext *s)
marker = bytestream2_get_be16u(&s->g);
oldpos = bytestream2_tell(&s->g);
if (marker >= 0xFF30 && marker <= 0xFF3F)
continue;
if (marker == JPEG2000_SOD) {
Jpeg2000Tile *tile;
Jpeg2000TilePart *tp;

Loading…
Cancel
Save