зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1133478: Postpone parsing TRUN atom until we have all dependent atoms. r=k17e
Atoms may be out of order inside MOOF, in particular the TFDT may only be defined after TRUN.
This commit is contained in:
Родитель
31151f0376
Коммит
6dffa7b1fa
|
@ -301,8 +301,6 @@ Moof::ParseTraf(Box& aBox, Trex& aTrex, Mdhd& aMdhd, Edts& aEdts, Sinf& aSinf)
|
|||
} else if (!aTrex.mTrackId || tfhd.mTrackId == aTrex.mTrackId) {
|
||||
if (box.IsType("tfdt")) {
|
||||
tfdt = Tfdt(box);
|
||||
} else if (box.IsType("trun")) {
|
||||
ParseTrun(box, tfhd, tfdt, aMdhd, aEdts);
|
||||
} else if (box.IsType("saiz")) {
|
||||
mSaizs.AppendElement(Saiz(box, aSinf.mDefaultEncryptionType));
|
||||
} else if (box.IsType("saio")) {
|
||||
|
@ -310,6 +308,18 @@ Moof::ParseTraf(Box& aBox, Trex& aTrex, Mdhd& aMdhd, Edts& aEdts, Sinf& aSinf)
|
|||
}
|
||||
}
|
||||
}
|
||||
if (aTrex.mTrackId && tfhd.mTrackId != aTrex.mTrackId) {
|
||||
return;
|
||||
}
|
||||
// Now search for TRUN box.
|
||||
for (Box box = aBox.FirstChild(); box.IsAvailable(); box = box.Next()) {
|
||||
if (box.IsType("trun")) {
|
||||
ParseTrun(box, tfhd, tfdt, aMdhd, aEdts);
|
||||
if (IsValid()) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
|
Загрузка…
Ссылка в новой задаче