From 4b11a163c3fb27a1064fbc420c979534715c6aec Mon Sep 17 00:00:00 2001 From: nilaoda Date: Sun, 10 Jul 2022 12:41:33 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=9C=AA=E8=AF=86=E5=88=AB?= =?UTF-8?q?=E5=88=B0=E5=88=86=E7=89=87=E7=9A=84=E5=9C=BA=E6=99=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/N_m3u8DL-RE.Parser/Extractor/DASHExtractor2.cs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/N_m3u8DL-RE.Parser/Extractor/DASHExtractor2.cs b/src/N_m3u8DL-RE.Parser/Extractor/DASHExtractor2.cs index f0a3b79..320cce9 100644 --- a/src/N_m3u8DL-RE.Parser/Extractor/DASHExtractor2.cs +++ b/src/N_m3u8DL-RE.Parser/Extractor/DASHExtractor2.cs @@ -348,6 +348,20 @@ namespace N_m3u8DL_RE.Parser.Extractor } } + //如果依旧没被添加分片,直接把BaseUrl塞进去就好 + if (streamSpec.Playlist.MediaParts[0].MediaSegments.Count == 0) + { + streamSpec.Playlist.MediaParts[0].MediaSegments.Add + ( + new MediaSegment() + { + Index = 0, + Url = PreProcessUrl(segBaseUrl), + Duration = XmlConvert.ToTimeSpan(periodDuration ?? mediaPresentationDuration ?? "PT0S").TotalSeconds + } + ); + } + //判断加密情况 if (adaptationSet.Elements().Any(e => e.Name.LocalName == "ContentProtection")) {