Bug 1140933 - Handle empty subsample encryption information in SampleIterator - r=cpearce

This commit is contained in:
Edwin Flores 2015-03-09 13:55:33 +13:00
parent 91f4cd2afc
commit 103dc00fa4

View File

@ -146,6 +146,10 @@ MP4Sample* SampleIterator::GetNext()
sample->crypto.plain_sizes.AppendElement(reader.ReadU16());
sample->crypto.encrypted_sizes.AppendElement(reader.ReadU32());
}
} else {
// No subsample information means the entire sample is encrypted.
sample->crypto.plain_sizes.AppendElement(0);
sample->crypto.encrypted_sizes.AppendElement(sample->size);
}
}