[FFmpeg-devel] [PATCH v2 2/3] libavcodec/jpeg2000dec: Support for Parameterless Markers
gautamramk at gmail.com
gautamramk at gmail.com
Sat Jul 18 16:16:21 EEST 2020
From: Gautam Ramakrishnan <gautamramk at gmail.com>
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.
---
libavcodec/jpeg2000dec.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libavcodec/jpeg2000dec.c b/libavcodec/jpeg2000dec.c
index 5043125fe3..5e9e97eb6a 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;
--
2.17.1
More information about the ffmpeg-devel
mailing list