MP4 speed optimize

This commit is contained in:
Thulinma 2017-01-31 14:48:49 +01:00
parent 7f7b35acce
commit 29669f24c4
5 changed files with 22 additions and 24 deletions

View file

@ -58,9 +58,10 @@ namespace MP4 {
setBox(newContent, tempLoc);
}
Box & TRAF::getContent(uint32_t no) {
/// Gets a reference to the given box number. If unsafe, doesn't check boundaries (getContentCount check skipped).
Box & TRAF::getContent(uint32_t no, bool unsafe) {
static Box ret = Box((char *)"\000\000\000\010erro", false);
if (no > getContentCount()) {
if (!unsafe && no > getContentCount()) {
return ret;
}
unsigned int i = 0;