mirror of
https://github.com/androidx/media.git
synced 2025-04-30 06:46:50 +08:00
Fix for IV bigger than 32 bits #145
This commit is contained in:
parent
3abcefa00c
commit
c57484f90a
@ -393,11 +393,8 @@ public class HlsChunkSource {
|
||||
byte[] secretKey = new byte[data.bytesLeft()];
|
||||
data.readBytes(secretKey, 0, secretKey.length);
|
||||
|
||||
int ivParsed = Integer.parseInt(iv, 16);
|
||||
String iv = String.format("%032X", ivParsed);
|
||||
|
||||
byte[] ivData = new BigInteger(iv, 16).toByteArray();
|
||||
byte[] ivDataWithPadding = new byte[iv.length() / 2];
|
||||
byte[] ivDataWithPadding = new byte[16];
|
||||
System.arraycopy(ivData, 0, ivDataWithPadding, ivDataWithPadding.length - ivData.length,
|
||||
ivData.length);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user