mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-06 11:34:57 +02:00
fixes #407 - Web Client streaming video freeze on audio language or quality modification
This commit is contained in:
parent
6bbf3e5efb
commit
90077dd216
2 changed files with 11 additions and 8 deletions
|
@ -1,4 +1,5 @@
|
||||||
using MediaBrowser.Common.Extensions;
|
using System.Globalization;
|
||||||
|
using MediaBrowser.Common.Extensions;
|
||||||
using MediaBrowser.Common.IO;
|
using MediaBrowser.Common.IO;
|
||||||
using MediaBrowser.Common.MediaInfo;
|
using MediaBrowser.Common.MediaInfo;
|
||||||
using MediaBrowser.Controller;
|
using MediaBrowser.Controller;
|
||||||
|
@ -111,6 +112,8 @@ namespace MediaBrowser.Api.Playback
|
||||||
return Path.Combine(folder, GetCommandLineArguments("dummy\\dummy", state, false).GetMD5() + (outputFileExtension ?? string.Empty).ToLower());
|
return Path.Combine(folder, GetCommandLineArguments("dummy\\dummy", state, false).GetMD5() + (outputFileExtension ?? string.Empty).ToLower());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected readonly CultureInfo UsCulture = new CultureInfo("en-US");
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The fast seek offset seconds
|
/// The fast seek offset seconds
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -132,7 +135,7 @@ namespace MediaBrowser.Api.Playback
|
||||||
|
|
||||||
if (seconds > 0)
|
if (seconds > 0)
|
||||||
{
|
{
|
||||||
return string.Format("-ss {0}", seconds);
|
return string.Format("-ss {0}", seconds.ToString(UsCulture));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -153,7 +156,7 @@ namespace MediaBrowser.Api.Playback
|
||||||
{
|
{
|
||||||
if (TimeSpan.FromTicks(time.Value).TotalSeconds - FastSeekOffsetSeconds > 0)
|
if (TimeSpan.FromTicks(time.Value).TotalSeconds - FastSeekOffsetSeconds > 0)
|
||||||
{
|
{
|
||||||
return string.Format(" -ss {0}", FastSeekOffsetSeconds);
|
return string.Format(" -ss {0}", FastSeekOffsetSeconds.ToString(UsCulture));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -580,8 +580,8 @@ namespace MediaBrowser.Server.Implementations.MediaEncoder
|
||||||
var fastSeekSeconds = offset.TotalSeconds >= 1 ? offset.TotalSeconds - 1 : 0;
|
var fastSeekSeconds = offset.TotalSeconds >= 1 ? offset.TotalSeconds - 1 : 0;
|
||||||
var slowSeekSeconds = offset.TotalSeconds >= 1 ? 1 : 0;
|
var slowSeekSeconds = offset.TotalSeconds >= 1 ? 1 : 0;
|
||||||
|
|
||||||
var fastSeekParam = fastSeekSeconds > 0 ? "-ss " + fastSeekSeconds + " " : string.Empty;
|
var fastSeekParam = fastSeekSeconds > 0 ? "-ss " + fastSeekSeconds.ToString(UsCulture) + " " : string.Empty;
|
||||||
var slowSeekParam = slowSeekSeconds > 0 ? " -ss " + slowSeekSeconds : string.Empty;
|
var slowSeekParam = slowSeekSeconds > 0 ? " -ss " + slowSeekSeconds.ToString(UsCulture) : string.Empty;
|
||||||
|
|
||||||
var encodingParam = string.IsNullOrEmpty(language) ? string.Empty :
|
var encodingParam = string.IsNullOrEmpty(language) ? string.Empty :
|
||||||
GetSubtitleLanguageEncodingParam(language) + " ";
|
GetSubtitleLanguageEncodingParam(language) + " ";
|
||||||
|
@ -798,8 +798,8 @@ namespace MediaBrowser.Server.Implementations.MediaEncoder
|
||||||
var fastSeekSeconds = offset.TotalSeconds >= 1 ? offset.TotalSeconds - 1 : 0;
|
var fastSeekSeconds = offset.TotalSeconds >= 1 ? offset.TotalSeconds - 1 : 0;
|
||||||
var slowSeekSeconds = offset.TotalSeconds >= 1 ? 1 : 0;
|
var slowSeekSeconds = offset.TotalSeconds >= 1 ? 1 : 0;
|
||||||
|
|
||||||
var fastSeekParam = fastSeekSeconds > 0 ? "-ss " + fastSeekSeconds + " " : string.Empty;
|
var fastSeekParam = fastSeekSeconds > 0 ? "-ss " + fastSeekSeconds.ToString(UsCulture) + " " : string.Empty;
|
||||||
var slowSeekParam = slowSeekSeconds > 0 ? " -ss " + slowSeekSeconds : string.Empty;
|
var slowSeekParam = slowSeekSeconds > 0 ? " -ss " + slowSeekSeconds.ToString(UsCulture) : string.Empty;
|
||||||
|
|
||||||
var process = new Process
|
var process = new Process
|
||||||
{
|
{
|
||||||
|
@ -1032,7 +1032,7 @@ namespace MediaBrowser.Server.Implementations.MediaEncoder
|
||||||
|
|
||||||
if (offset.HasValue)
|
if (offset.HasValue)
|
||||||
{
|
{
|
||||||
args = string.Format("-ss {0} ", Convert.ToInt32(offset.Value.TotalSeconds)) + args;
|
args = string.Format("-ss {0} ", Convert.ToInt32(offset.Value.TotalSeconds)).ToString(UsCulture) + args;
|
||||||
}
|
}
|
||||||
|
|
||||||
var process = new Process
|
var process = new Process
|
||||||
|
|
Loading…
Reference in a new issue