зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1044713 - Modify MP4 metadata parser to make it less sensitive to atom ordering; r=edwin
This commit is contained in:
Родитель
54c40af7e1
Коммит
d3ef0039ef
|
@ -476,26 +476,27 @@ status_t MPEG4Extractor::readMetaData() {
|
|||
}
|
||||
|
||||
off64_t offset = 0;
|
||||
status_t err;
|
||||
status_t err = OK;
|
||||
while (true) {
|
||||
err = parseChunk(&offset, 0);
|
||||
if (err == OK) {
|
||||
continue;
|
||||
}
|
||||
|
||||
uint32_t hdr[2];
|
||||
if (mDataSource->readAt(offset, hdr, 8) < 8) {
|
||||
break;
|
||||
}
|
||||
uint32_t chunk_type = ntohl(hdr[1]);
|
||||
if (chunk_type == FOURCC('s', 'i', 'd', 'x')) {
|
||||
// parse the sidx box too
|
||||
continue;
|
||||
} else if (chunk_type == FOURCC('m', 'o', 'o', 'f')) {
|
||||
if (chunk_type == FOURCC('m', 'd', 'a', 't')) {
|
||||
break;
|
||||
}
|
||||
if (chunk_type == FOURCC('m', 'o', 'o', 'f')) {
|
||||
// store the offset of the first segment
|
||||
mMoofOffset = offset;
|
||||
break;
|
||||
}
|
||||
err = parseChunk(&offset, 0);
|
||||
if (err != OK &&
|
||||
chunk_type != FOURCC('s', 'i', 'd', 'x') &&
|
||||
chunk_type != FOURCC('m', 'o', 'o', 'v')) {
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if (mInitCheck == OK) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче