修复 AES-128 解密时错误地未使用指定的 IV (#823)

* Fix AES-128 IV parsing when same key URI is used with different IVs

* Make sure to re-parse the key if either KEY URL or IV changed
This commit is contained in:
fireattack
2025-12-29 00:02:46 +08:00
committed by GitHub
parent 17d697b1d7
commit de20b29a66

View File

@@ -310,11 +310,8 @@ internal class HLSExtractor : IExtractor
// 解析KEY
else if (line.StartsWith(HLSTags.ext_x_key))
{
var uri = ParserUtil.GetAttribute(line, "URI");
var uri_last = ParserUtil.GetAttribute(lastKeyLine, "URI");
// 如果KEY URL相同不进行重复解析
if (uri != uri_last)
// 如果KEY line相同则不再重复解析
if (line != lastKeyLine)
{
// 调用处理器进行解析
var parsedInfo = ParseKey(line);