Bug 1340446 - check the rounding error smaller or euqal to one. r=kinetik

MozReview-Commit-ID: 5LYzYlZzmEB

--HG--
extra : rebase_source : c8a831212ea4d06da4105ff1186a67ffb5d9d96d
This commit is contained in:
Alfredo.Yang 2017-02-22 11:38:16 +08:00
Родитель d354f25e55
Коммит 1f16c44c38
1 изменённых файлов: 3 добавлений и 3 удалений

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

@ -374,9 +374,9 @@ MP4Metadata::ReadTrackIndex(FallibleTArray<Index::Indice>& aDest, mozilla::Track
for (uint32_t i = 0; i < data.length; i++) {
MOZ_DIAGNOSTIC_ASSERT(data.indices[i].start_offset == aDest[i].start_offset);
MOZ_DIAGNOSTIC_ASSERT(data.indices[i].end_offset == aDest[i].end_offset);
MOZ_DIAGNOSTIC_ASSERT(data.indices[i].start_composition == aDest[i].start_composition);
MOZ_DIAGNOSTIC_ASSERT(data.indices[i].end_composition == aDest[i].end_composition);
MOZ_DIAGNOSTIC_ASSERT(data.indices[i].start_decode == aDest[i].start_decode);
MOZ_DIAGNOSTIC_ASSERT(llabs(data.indices[i].start_composition - aDest[i].start_composition) <= 1);
MOZ_DIAGNOSTIC_ASSERT(llabs(data.indices[i].end_composition - aDest[i].end_composition) <= 1);
MOZ_DIAGNOSTIC_ASSERT(llabs(data.indices[i].start_decode - aDest[i].start_decode) <= 1);
MOZ_DIAGNOSTIC_ASSERT(data.indices[i].sync == aDest[i].sync);
}
}