应当为`EXT-X-MAP`设置`EncryptInfo`
相关信息:https://github.com/nilaoda/N_m3u8DL-CLI/issues/744
This commit is contained in:
parent
ea00099055
commit
3d23093b3a
|
@ -380,6 +380,13 @@ namespace N_m3u8DL_RE.Parser.Extractor
|
||||||
playlist.MediaInit.ExpectLength = n;
|
playlist.MediaInit.ExpectLength = n;
|
||||||
playlist.MediaInit.StartRange = o ?? 0L;
|
playlist.MediaInit.StartRange = o ?? 0L;
|
||||||
}
|
}
|
||||||
|
//是否有加密,有的话写入KEY和IV
|
||||||
|
if (currentEncryptInfo.Method != EncryptMethod.NONE)
|
||||||
|
{
|
||||||
|
playlist.MediaInit.EncryptInfo.Method = currentEncryptInfo.Method;
|
||||||
|
playlist.MediaInit.EncryptInfo.Key = currentEncryptInfo.Key;
|
||||||
|
playlist.MediaInit.EncryptInfo.IV = currentEncryptInfo.IV ?? HexUtil.HexToBytes(Convert.ToString(segIndex, 16).PadLeft(32, '0'));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
//遇到了其他的map,说明已经不是一个视频了,全部丢弃即可
|
//遇到了其他的map,说明已经不是一个视频了,全部丢弃即可
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue