[FFmpeg-cvslog] libavcodec/jpeg2000dec: Support for Parameterless Markers

Gautam Ramakrishnan git at videolan.org
Sun Jul 19 12:01:40 EEST 2020


ffmpeg | branch: master | Gautam Ramakrishnan <gautamramk at gmail.com> | Sat Jul 18 19:04:21 2020 +0530| [e39490615fcae8e9399e907a63f07aa8d0f9148d] | committer: Michael Niedermayer

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 at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e39490615fcae8e9399e907a63f07aa8d0f9148d
---

 libavcodec/jpeg2000dec.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

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;



More information about the ffmpeg-cvslog mailing list