diff options
author | Gautam Ramakrishnan <gautamramk@gmail.com> | 2020-07-18 18:46:21 +0530 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2020-07-19 10:59:43 +0200 |
commit | e39490615fcae8e9399e907a63f07aa8d0f9148d (patch) | |
tree | b971bed0b39a748df700fe38e01787e6a47463fb /libavcodec | |
parent | 489c5db0791f39518775b12eef6d48276c17f96f (diff) | |
download | ffmpeg-e39490615fcae8e9399e907a63f07aa8d0f9148d.tar.gz |
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>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/jpeg2000dec.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/jpeg2000dec.c b/libavcodec/jpeg2000dec.c index 5ea6fd0b9a..f5ad8402fb 100644 --- a/libavcodec/jpeg2000dec.c +++ b/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; |