hls fix
This commit is contained in:
parent
f0f9f5c68c
commit
2652c8918c
|
@ -13,7 +13,6 @@ using MediaBrowser.Model.IO;
|
||||||
using MediaBrowser.Model.Serialization;
|
using MediaBrowser.Model.Serialization;
|
||||||
using ServiceStack;
|
using ServiceStack;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Concurrent;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
@ -713,11 +712,13 @@ namespace MediaBrowser.Api.Playback.Hls
|
||||||
|
|
||||||
var index = 0;
|
var index = 0;
|
||||||
|
|
||||||
|
double segmentLength = state.SegmentLength;
|
||||||
|
|
||||||
while (seconds > 0)
|
while (seconds > 0)
|
||||||
{
|
{
|
||||||
var length = seconds >= state.SegmentLength ? state.SegmentLength : seconds;
|
var length = seconds >= state.SegmentLength ? segmentLength : seconds;
|
||||||
|
|
||||||
builder.AppendLine("#EXTINF:" + length.ToString(UsCulture) + ",");
|
builder.AppendLine("#EXTINF:" + length.ToString("0.000000", UsCulture) + ",");
|
||||||
|
|
||||||
builder.AppendLine(string.Format("hlsdynamic/{0}/{1}{2}{3}",
|
builder.AppendLine(string.Format("hlsdynamic/{0}/{1}{2}{3}",
|
||||||
|
|
||||||
|
@ -726,7 +727,7 @@ namespace MediaBrowser.Api.Playback.Hls
|
||||||
GetSegmentFileExtension(isOutputVideo),
|
GetSegmentFileExtension(isOutputVideo),
|
||||||
queryString));
|
queryString));
|
||||||
|
|
||||||
seconds -= state.SegmentLength;
|
seconds -= length;
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user