Skip to content

Commit

Permalink
Bug 1138992: P1. Ignore ctts version if we have 0 samples in the tabl…
Browse files Browse the repository at this point in the history
…e. r=kentuckyfriedtakahe
  • Loading branch information
Jean-Yves Avenard committed Sep 23, 2015
1 parent 5b1ea92 commit 9626f34
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -388,13 +388,13 @@ status_t SampleTable::setCompositionTimeToSampleParams(
return ERROR_IO;
}

if (U32_AT(header) != 0) {
uint32_t numEntries = U32_AT(&header[4]);

if (U32_AT(header) != 0 && numEntries) {
// Expected version = 0, flags = 0.
return ERROR_MALFORMED;
}

uint32_t numEntries = U32_AT(&header[4]);

if (data_size != ((uint64_t)numEntries + 1) * 8) {
return ERROR_MALFORMED;
}
Expand Down

0 comments on commit 9626f34

Please sign in to comment.