Fix the broken fMP4 main playlist (#7263)

pull/7277/head
Nyanmisaka 3 years ago committed by GitHub
parent 6af7d5445f
commit 6c53420fe3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -46,7 +46,7 @@ public class DynamicHlsPlaylistGenerator : IDynamicHlsPlaylistGenerator
var segmentExtension = EncodingHelper.GetSegmentFileExtension(request.SegmentContainer);
// http://ffmpeg.org/ffmpeg-all.html#toc-hls-2
var isHlsInFmp4 = string.Equals(segmentExtension, "mp4", StringComparison.OrdinalIgnoreCase);
var isHlsInFmp4 = string.Equals(segmentExtension, ".mp4", StringComparison.OrdinalIgnoreCase);
var hlsVersion = isHlsInFmp4 ? "7" : "3";
var builder = new StringBuilder(128);
@ -65,11 +65,14 @@ public class DynamicHlsPlaylistGenerator : IDynamicHlsPlaylistGenerator
if (isHlsInFmp4)
{
// Init file that only includes fMP4 headers
builder.Append("#EXT-X-MAP:URI=\"")
.Append(request.EndpointPrefix)
.Append("-1")
.Append(segmentExtension)
.Append(request.QueryString)
.Append("&runtimeTicks=0")
.Append("&actualSegmentLengthTicks=0")
.Append('"')
.AppendLine();
}

Loading…
Cancel
Save