fixes #407 - Web Client streaming video freeze on audio language or quality modification
This commit is contained in:
parent
6bbf3e5efb
commit
90077dd216
|
@ -1,4 +1,5 @@
|
|||
using MediaBrowser.Common.Extensions;
|
||||
using System.Globalization;
|
||||
using MediaBrowser.Common.Extensions;
|
||||
using MediaBrowser.Common.IO;
|
||||
using MediaBrowser.Common.MediaInfo;
|
||||
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());
|
||||
}
|
||||
|
||||
protected readonly CultureInfo UsCulture = new CultureInfo("en-US");
|
||||
|
||||
/// <summary>
|
||||
/// The fast seek offset seconds
|
||||
/// </summary>
|
||||
|
@ -132,7 +135,7 @@ namespace MediaBrowser.Api.Playback
|
|||
|
||||
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)
|
||||
{
|
||||
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 slowSeekSeconds = offset.TotalSeconds >= 1 ? 1 : 0;
|
||||
|
||||
var fastSeekParam = fastSeekSeconds > 0 ? "-ss " + fastSeekSeconds + " " : string.Empty;
|
||||
var slowSeekParam = slowSeekSeconds > 0 ? " -ss " + slowSeekSeconds : string.Empty;
|
||||
var fastSeekParam = fastSeekSeconds > 0 ? "-ss " + fastSeekSeconds.ToString(UsCulture) + " " : string.Empty;
|
||||
var slowSeekParam = slowSeekSeconds > 0 ? " -ss " + slowSeekSeconds.ToString(UsCulture) : string.Empty;
|
||||
|
||||
var encodingParam = string.IsNullOrEmpty(language) ? string.Empty :
|
||||
GetSubtitleLanguageEncodingParam(language) + " ";
|
||||
|
@ -798,8 +798,8 @@ namespace MediaBrowser.Server.Implementations.MediaEncoder
|
|||
var fastSeekSeconds = offset.TotalSeconds >= 1 ? offset.TotalSeconds - 1 : 0;
|
||||
var slowSeekSeconds = offset.TotalSeconds >= 1 ? 1 : 0;
|
||||
|
||||
var fastSeekParam = fastSeekSeconds > 0 ? "-ss " + fastSeekSeconds + " " : string.Empty;
|
||||
var slowSeekParam = slowSeekSeconds > 0 ? " -ss " + slowSeekSeconds : string.Empty;
|
||||
var fastSeekParam = fastSeekSeconds > 0 ? "-ss " + fastSeekSeconds.ToString(UsCulture) + " " : string.Empty;
|
||||
var slowSeekParam = slowSeekSeconds > 0 ? " -ss " + slowSeekSeconds.ToString(UsCulture) : string.Empty;
|
||||
|
||||
var process = new Process
|
||||
{
|
||||
|
@ -1032,7 +1032,7 @@ namespace MediaBrowser.Server.Implementations.MediaEncoder
|
|||
|
||||
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
|
||||
|
|
Loading…
Reference in New Issue
Block a user