Skip to content

Commit

Permalink
优化timeShiftBufferDepth不存在的情况 Fix #211
Browse files Browse the repository at this point in the history
  • Loading branch information
nilaoda committed Jun 28, 2023
1 parent ba1844c commit ae771d2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/N_m3u8DL-RE.Parser/Extractor/DASHExtractor2.cs
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,11 @@ public async Task<List<StreamSpec>> ExtractStreamsAsync(string rawText)
var availabilityStartTime = mpdElement.Attribute("availabilityStartTime")?.Value;
//在availabilityStartTime的前XX段时间,分片有效
var timeShiftBufferDepth = mpdElement.Attribute("timeShiftBufferDepth")?.Value;
if (string.IsNullOrEmpty(timeShiftBufferDepth))
{
//如果没有 默认一分钟有效
timeShiftBufferDepth = "PT1M";
}
//MPD发布时间
var publishTime = mpdElement.Attribute("publishTime")?.Value;
//MPD总时长
Expand Down

0 comments on commit ae771d2

Please sign in to comment.