File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
isoparser/src/main/java/org/mp4parser/boxes/iso23001/part7 Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -133,8 +133,8 @@ protected void getContent(ByteBuffer byteBuffer) {
133133 IsoTypeWriter .writeUInt32 (byteBuffer , getNonEmptyEntriesNum ());
134134 for (CencSampleAuxiliaryDataFormat entry : entries ) {
135135 if (entry .getSize () > 0 ) {
136- if (entry .iv .length != 8 && entry .iv .length != 16 ) {
137- throw new RuntimeException ("IV must be either 8 or 16 bytes" );
136+ if (entry .iv .length != 0 && entry . iv . length != 8 && entry .iv .length != 16 ) {
137+ throw new RuntimeException ("IV must be either 0, 8 or 16 bytes" );
138138 }
139139 byteBuffer .put (entry .iv );
140140 if (isSubSampleEncryption ()) {
Original file line number Diff line number Diff line change @@ -75,7 +75,10 @@ public boolean equals(Object o) {
7575
7676 CencSampleAuxiliaryDataFormat entry = (CencSampleAuxiliaryDataFormat ) o ;
7777
78- if (!new BigInteger (iv ).equals (new BigInteger (entry .iv ))) {
78+ BigInteger a = iv .length == 0 ? BigInteger .ZERO : new BigInteger (iv );
79+ BigInteger b = entry .iv .length == 0 ? BigInteger .ZERO : new BigInteger (entry .iv );
80+ if (!(a .equals (b )))
81+ {
7982 return false ;
8083 }
8184 if (pairs != null ? !Arrays .equals (pairs , entry .pairs ) : entry .pairs != null ) {
You can’t perform that action at this time.
0 commit comments