I'd really prefer a patch that leaves parseMP4Metadata() unmodified and instead adds a new function checkMP4Type() or something like that.  It should be pretty simple, shouldn't it?  Aren't the compatible brands always at a fixed offset from the start of the file?  And are there always 2 of them, or can it be any number.  In any case, can you just pass  change this code to something like:

if (checkMP4Type(header, MP4Types)) {
  parseMP4Metadata(header)
}
else {
  errorCallback('unknown...');
}