Limit ModPlug to 2MB files
commitb4605534406c350e243e771760054798efc5a656
authorChris Robinson <chris.kcat@gmail.com>
Mon, 24 Jan 2011 13:04:10 +0000 (24 05:04 -0800)
committerChris Robinson <chris.kcat@gmail.com>
Mon, 24 Jan 2011 13:04:10 +0000 (24 05:04 -0800)
treed3ec0abb2a4251a3a5fb33cc625b983df2e0d9dc
parent6f2598c825d004a26924a5df0be2eaf65a084beb
Limit ModPlug to 2MB files
Because libModPlug doesn't use (virtual) IO routines to sequentially check and
load files, we have to load it fully into memory ourselves. For large files,
loading them fully into memory is wasteful and risks OOM errors, especially if
it's not something ModPlug can handle.
Hardly a perfect solution, but libModPlug really is lacking here.
src/streamdec.cpp