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>
This commit is contained in:
Gautam Ramakrishnan 2020-07-18 18:46:21 +05:30 committed by Michael Niedermayer
parent 489c5db079
commit e39490615f

View File

@ -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;