修正实时解密无法合并的问题
This commit is contained in:
parent
d6bbde3ca4
commit
586ac0d36c
|
@ -54,7 +54,6 @@ namespace N_m3u8DL_RE.DownloadManager
|
||||||
//mp4decrypt
|
//mp4decrypt
|
||||||
var mp4decrypt = DownloaderConfig.DecryptionBinaryPath!;
|
var mp4decrypt = DownloaderConfig.DecryptionBinaryPath!;
|
||||||
var mp4InitFile = "";
|
var mp4InitFile = "";
|
||||||
var mp4InitFileDec = "";
|
|
||||||
var currentKID = "";
|
var currentKID = "";
|
||||||
|
|
||||||
Logger.Debug($"dirName: {dirName}; tmpDir: {tmpDir}; saveDir: {saveDir}; saveName: {saveName}; output: {output}");
|
Logger.Debug($"dirName: {dirName}; tmpDir: {tmpDir}; saveDir: {saveDir}; saveName: {saveName}; output: {output}");
|
||||||
|
@ -112,9 +111,7 @@ namespace N_m3u8DL_RE.DownloadManager
|
||||||
var dResult = await MP4DecryptUtil.DecryptAsync(DownloaderConfig.UseShakaPackager, mp4decrypt, DownloaderConfig.Keys, enc, dec, currentKID);
|
var dResult = await MP4DecryptUtil.DecryptAsync(DownloaderConfig.UseShakaPackager, mp4decrypt, DownloaderConfig.Keys, enc, dec, currentKID);
|
||||||
if (dResult)
|
if (dResult)
|
||||||
{
|
{
|
||||||
//实时解密不需要init文件用于合并
|
FileDic[streamSpec.Playlist.MediaInit]!.ActualFilePath = dec;
|
||||||
FileDic!.Remove(streamSpec.Playlist.MediaInit, out _);
|
|
||||||
mp4InitFileDec = dec;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -150,8 +147,11 @@ namespace N_m3u8DL_RE.DownloadManager
|
||||||
if (DownloaderConfig.MP4RealTimeDecryption && mp4InitFile != "")
|
if (DownloaderConfig.MP4RealTimeDecryption && mp4InitFile != "")
|
||||||
{
|
{
|
||||||
File.Delete(mp4InitFile);
|
File.Delete(mp4InitFile);
|
||||||
if (mp4InitFileDec != "")
|
//shaka实时解密不需要init文件用于合并
|
||||||
File.Delete(mp4InitFileDec);
|
if (DownloaderConfig.UseShakaPackager)
|
||||||
|
{
|
||||||
|
FileDic!.Remove(streamSpec.Playlist!.MediaInit, out _);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//校验分片数量
|
//校验分片数量
|
||||||
|
|
Loading…
Reference in New Issue