mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-07-21 05:00:39 +02:00
update translations
This commit is contained in:
parent
ff33ebbe73
commit
046eaa7671
|
@ -285,20 +285,23 @@ namespace MediaBrowser.Api.Playback.Hls
|
||||||
private double[] GetSegmentLengths(StreamState state)
|
private double[] GetSegmentLengths(StreamState state)
|
||||||
{
|
{
|
||||||
var result = new List<double>();
|
var result = new List<double>();
|
||||||
var encoder = GetVideoEncoder(state);
|
if (state.VideoRequest != null)
|
||||||
|
|
||||||
if (string.Equals(encoder, "copy", StringComparison.OrdinalIgnoreCase))
|
|
||||||
{
|
{
|
||||||
var videoStream = state.VideoStream;
|
var encoder = GetVideoEncoder(state);
|
||||||
if (videoStream.KeyFrames != null && videoStream.KeyFrames.Count > 0)
|
|
||||||
|
if (string.Equals(encoder, "copy", StringComparison.OrdinalIgnoreCase))
|
||||||
{
|
{
|
||||||
foreach (var frame in videoStream.KeyFrames)
|
var videoStream = state.VideoStream;
|
||||||
|
if (videoStream.KeyFrames != null && videoStream.KeyFrames.Count > 0)
|
||||||
{
|
{
|
||||||
var seconds = TimeSpan.FromMilliseconds(frame).TotalSeconds;
|
foreach (var frame in videoStream.KeyFrames)
|
||||||
seconds -= result.Sum();
|
{
|
||||||
result.Add(seconds);
|
var seconds = TimeSpan.FromMilliseconds(frame).TotalSeconds;
|
||||||
|
seconds -= result.Sum();
|
||||||
|
result.Add(seconds);
|
||||||
|
}
|
||||||
|
return result.ToArray();
|
||||||
}
|
}
|
||||||
return result.ToArray();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue