[FFmpeg-devel] [PATCH] mov demuxer crashes on certain .jp2 files

Jai Menon jmenon86
Tue Dec 16 11:13:11 CET 2008


On Tue, Dec 16, 2008 at 2:20 PM, Baptiste Coudurier
<baptiste.coudurier at gmail.com> wrote:
> Hi,
> Jai Menon wrote:
>> Hi,
>> The mov demuxer segfaults when parsing certain .jp2 files found at :
>> http://samples.mplayerhq.hu/jpeg2000/j2kp4files_v1_2.zip/testfiles_jp2/*.jp2
>> Attached patch fixes this issue.
> Fixed in a slightly different way.
> We still need to figure out what is the best way to handle .jp2 and .mj2.
> My first feeling is that the decoder will need to support 'atom'
> structure so .jp2 can be used with image2 format, maybe it does already,
> I don't know.

jp2 is defined in itu recommendation t.800 annex I and it has the same
box/atom structure.
there is a signature atom, ftyp, jp2h, jp2c and other not so important atoms.

> .mj2 is ISO media with 'jp2h' atom in 'stsd', chunks of data are 'jp2c'
> atoms IIRC.

from the motion jpeg2k (t.802) itu rec, section 4.3 :

4.3 JP2 inheritance and compatibility
2) The objects (boxes or atoms) required by the JP2 specification
shall also be present.

so isn't it better that jp2 be handled by the mov demuxer itself? this
would basically mean handling the jp2h and jp2c



More information about the ffmpeg-devel mailing list