Bug 1275853: [mp4] Don't reject boxes that contains padding but can be easily skipped. r=kentuckyfriedtakahe

My guess is that the application generating those files, does a very rough estimate on what the sample table size is going to be, which allows to perform the conversion in a single pass. This allows to place the moov box at the beginning.

MozReview-Commit-ID: IGzxTho4Akk

--HG--
extra : rebase_source : b6ca711a00f8b2d7d8708acdd17f52f59b469685
This commit is contained in:
Jean-Yves Avenard 2016-05-28 10:42:01 +10:00
Родитель 07f877b595
Коммит 0425d28998
2 изменённых файлов: 3 добавлений и 4 удалений

Просмотреть файл

@ -1171,9 +1171,8 @@ status_t MPEG4Extractor::parseChunk(off64_t *offset, int depth) {
}
}
if (*offset != stop_offset) {
return ERROR_MALFORMED;
}
// Some muxers add some padding after the stsd content. Skip it.
*offset = stop_offset;
break;
}

Просмотреть файл

@ -395,7 +395,7 @@ status_t SampleTable::setCompositionTimeToSampleParams(
return ERROR_MALFORMED;
}
if (data_size != ((uint64_t)numEntries + 1) * 8) {
if (data_size < ((uint64_t)numEntries + 1) * 8) {
return ERROR_MALFORMED;
}