MP4Read dies with trying to allocate too much memory

12 views
Skip to first unread message

Dan Hinsley

unread,
Jul 31, 2012, 4:11:21 PM7/31/12
to mp4v2
I have a file that QT and iTunes will play, but when I try to open it
with MP4Read, it dies. The problem is in ReadChildAtoms->ReadAtom
The atom in question has a null type and a 0 for datasize. So MP4V2
decides that this atom extends to the end of the file, and since it's
only 3MB into a 450MB file, when it tries to execute:

pAtom->AddProperty(new MP4BytesProperty(*pAtom, "data", dataSize));

it ends up trying to allocate 450MB of memory and then fails.

So I'm sure the file is a little non-standard, but Video players seem
to be able to deal with it. I can put the file somewhere up on the
net if someone can take a look at it. Or I can debug into it, if
someone can give me a hint as to what other information I should be
looking for. And I can build the dll, so if someone has an idea of
how to deal with this, I can try the changes as well.

Thanks for the help,

Dan

Jeremy Noring

unread,
Aug 1, 2012, 9:19:26 AM8/1/12
to mp...@googlegroups.com
Could you fill out a bug and somehow make that file available?  

And I'm assuming you're using a pretty recent version of the library?  I recall having a similar issue with a specific file around the time of 1.9.1, that was fixed.  In my experience, mp4v2 can be sort of picky about malformed files (and often for no good reason) so it's probably a good area for improvement in the library.

Dan Hinsley

unread,
Aug 1, 2012, 4:34:15 PM8/1/12
to mp4v2
OK, it's issue 136. I last built rev 490.

On Aug 1, 6:19 am, Jeremy Noring <kid...@gmail.com> wrote:
Reply all
Reply to author
Forward
0 new messages