Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,8 @@ protected void getContent(ByteBuffer byteBuffer) {
IsoTypeWriter.writeUInt32(byteBuffer, getNonEmptyEntriesNum());
for (CencSampleAuxiliaryDataFormat entry : entries) {
if (entry.getSize() > 0) {
if (entry.iv.length != 8 && entry.iv.length != 16) {
throw new RuntimeException("IV must be either 8 or 16 bytes");
if (entry.iv.length != 0 && entry.iv.length != 8 && entry.iv.length != 16) {
throw new RuntimeException("IV must be either 0, 8 or 16 bytes");
}
byteBuffer.put(entry.iv);
if (isSubSampleEncryption()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,10 @@ public boolean equals(Object o) {

CencSampleAuxiliaryDataFormat entry = (CencSampleAuxiliaryDataFormat) o;

if (!new BigInteger(iv).equals(new BigInteger(entry.iv))) {
BigInteger iv = this.iv.length == 0 ? BigInteger.ZERO : new BigInteger(this.iv);
BigInteger entryIv = entry.iv.length == 0 ? BigInteger.ZERO : new BigInteger(entry.iv);
if (!(iv.equals(entryIv)))
{
return false;
}
if (pairs != null ? !Arrays.equals(pairs, entry.pairs) : entry.pairs != null) {
Expand Down