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

Baptiste Coudurier baptiste.coudurier
Tue Dec 16 19:50:54 CET 2008

Jai Menon wrote:
> Hi,
> 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
> atoms.

Why ? Please explain.
I gave you an idea why not: "so .jp2 can be used with image2 format"

In any way, mov demuxer will pass 'jp2c' atoms to decoder, so decoder
has to support atom structure in some way, I think adding support for
other boxes is trivial.

Baptiste COUDURIER                              GnuPG Key Id: 0x5C1ABAAA
Key fingerprint                 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
checking for life_signs in -lkenny... no

More information about the ffmpeg-devel mailing list