diff --git a/isoparser/src/main/java/com/googlecode/mp4parser/authoring/tracks/CencEncryptingTrackImpl.java b/isoparser/src/main/java/com/googlecode/mp4parser/authoring/tracks/CencEncryptingTrackImpl.java index 7f68ef42c..ffe2b3264 100644 --- a/isoparser/src/main/java/com/googlecode/mp4parser/authoring/tracks/CencEncryptingTrackImpl.java +++ b/isoparser/src/main/java/com/googlecode/mp4parser/authoring/tracks/CencEncryptingTrackImpl.java @@ -85,13 +85,13 @@ public long[] put(GroupEntry key, long[] value) { this.cencSampleAuxiliaryData = new ArrayList(); BigInteger one = new BigInteger("1"); - byte[] init = new byte[]{}; - BigInteger ivInt = new BigInteger(1, new byte[]{0, 0, 0, 0, 0, 0, 0, 0}); + byte[] init = new byte[]{0, 0, 0, 0, 0, 0, 0, 0}; + if (!dummyIvs) { Random random = new SecureRandom(); random.nextBytes(init); } - + BigInteger ivInt = new BigInteger(1, init); List groupEntries = new ArrayList();