arimus / jmimemagic

jMimeMagic is a Java library for determining the MIME type of files or streams.
http://sourceforge.net/projects/jmimemagic/
Apache License 2.0
206 stars 58 forks source link

MP4 files cause heap space issues #10

Open arimus opened 11 years ago

arimus commented 11 years ago

Moved from sf.net Rara (raprami)

When analysing the "Video029.mp4" file ( you can get it here : http://raphael.ramirez.free.fr/video029.mp4 ) with a custom magic.xml file (see attachement), MagicMatch match = Magic.getMagicMatch(file, true) breaks with a "java.lang.OutOfMemoryError: Java heap space".

arimus commented 11 years ago

This may be the fix, but need to dig into it. Don't remember if the MP4 detection was a fixed position or regex based matcher.

https://github.com/arimus/jmimemagic/commit/bbcd4e04f0d9cb0e60ad7ec98c40383d39e024d3