[FFmpeg-trac] #9769(avcodec:open): JPEG 2000 decoder: decoder should ignore any data that appears after End of Codestream marker 0xFFD9

FFmpeg trac at avcodec.org
Wed May 11 19:49:14 EEST 2022


#9769: JPEG 2000 decoder: decoder should ignore any data that appears after End of
Codestream marker 0xFFD9
-------------------------------------+-------------------------------------
             Reporter:  Pierre-      |                    Owner:  (none)
  Anthony Lemieux                    |
                 Type:  defect       |                   Status:  open
             Priority:  normal       |                Component:  avcodec
              Version:  git-master   |               Resolution:
             Keywords:  j2k          |               Blocked By:
             Blocking:               |  Reproduced by developer:  1
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
Description changed by Pierre-Anthony Lemieux:

Old description:

> Summary of the bug:
>
> JPEG 2000 decoder outputs {{{SOC marker not present}}} on a JPEG 2000
> codestream file (j2c) that contains bytes after the End of Codestream
> marker 0xFFD9.
>
> How to reproduce:
> {{{
> ffmpeg -i ../../j2k-samples/j2k1.j2c out.png
> ffmpeg version N-106674-gdcbf10acdc Copyright (c) 2000-2022 the FFmpeg
> developers
>   built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)
> }}}

New description:

 Summary of the bug:

 JPEG 2000 decoder outputs {{{SOC marker not present}}} on a JPEG 2000
 codestream file (j2c) that contains bad bytes after the End of Codestream
 marker 0xFFD9.

 See attached `j2k1.j2c​` file.

 A J2C file can contain only one codestreams, and thus bytes after the End
 of Codestream marker 0xFFD9 should be ignored.

 How to reproduce:
 {{{
 ffmpeg -i j2k1.j2c out.png
 ffmpeg version N-106674-gdcbf10acdc Copyright (c) 2000-2022 the FFmpeg
 developers
   built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)
 }}}

--
-- 
Ticket URL: <https://trac.ffmpeg.org/ticket/9769#comment:16>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list