Fixes to CMAF output

This commit is contained in:
Thulinma 2020-02-17 17:02:05 +01:00
parent e217f41f17
commit a8e04e1787
7 changed files with 69 additions and 84 deletions

View file

@ -1262,11 +1262,11 @@ namespace Mist{
}
if (encryption.substr(0, encryption.find('/')) == "CTR128"){
DTSC::Packet encPacket = aesCipher.encryptPacketCTR(
M, thisPacket, M.getIvec(idx) + M.getPartIndex(thisPacket, idx), idx);
M, thisPacket, M.getIvec(idx) + M.getPartIndex(thisPacket.getTime(), idx), idx);
thisPacket = encPacket;
}else if (encryption.substr(0, encryption.find('/')) == "CBC128"){
char ivec[] ={0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
Bit::htobll(ivec + 8, M.getIvec(idx) + M.getPartIndex(thisPacket, idx));
Bit::htobll(ivec + 8, M.getIvec(idx) + M.getPartIndex(thisPacket.getTime(), idx));
DTSC::Packet encPacket = aesCipher.encryptPacketCBC(M, thisPacket, ivec, idx);
thisPacket = encPacket;
}