mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-20 09:04:42 +01:00
Merge branch 'master' into readonlyspan
This commit is contained in:
@@ -198,7 +198,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
||||
internal static Version GetFFmpegVersion(string output)
|
||||
{
|
||||
// For pre-built binaries the FFmpeg version should be mentioned at the very start of the output
|
||||
var match = Regex.Match(output, @"^ffmpeg version n?((?:\d+\.?)+)");
|
||||
var match = Regex.Match(output, @"^ffmpeg version n?((?:[0-9]+\.?)+)");
|
||||
|
||||
if (match.Success)
|
||||
{
|
||||
@@ -225,7 +225,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
||||
var rc = new StringBuilder(144);
|
||||
foreach (Match m in Regex.Matches(
|
||||
output,
|
||||
@"((?<name>lib\w+)\s+(?<major>\d+)\.\s*(?<minor>\d+))",
|
||||
@"((?<name>lib\w+)\s+(?<major>[0-9]+)\.\s*(?<minor>[0-9]+))",
|
||||
RegexOptions.Multiline))
|
||||
{
|
||||
rc.Append(m.Groups["name"])
|
||||
|
||||
@@ -174,7 +174,7 @@ namespace MediaBrowser.MediaEncoding.Subtitles
|
||||
inputFiles = new[] { mediaSource.Path };
|
||||
}
|
||||
|
||||
var fileInfo = await GetReadableFile(mediaSource.Path, inputFiles, mediaSource.Protocol, subtitleStream, cancellationToken).ConfigureAwait(false);
|
||||
var fileInfo = await GetReadableFile(mediaSource.Path, inputFiles, _mediaSourceManager.GetPathProtocol(subtitleStream.Path), subtitleStream, cancellationToken).ConfigureAwait(false);
|
||||
|
||||
var stream = await GetSubtitleStream(fileInfo.Path, fileInfo.Protocol, fileInfo.IsExternal, cancellationToken).ConfigureAwait(false);
|
||||
|
||||
@@ -428,7 +428,9 @@ namespace MediaBrowser.MediaEncoding.Subtitles
|
||||
|
||||
// FFmpeg automatically convert character encoding when it is UTF-16
|
||||
// If we specify character encoding, it rejects with "do not specify a character encoding" and "Unable to recode subtitle event"
|
||||
if ((inputPath.EndsWith(".smi") || inputPath.EndsWith(".sami")) && (encodingParam == "UTF-16BE" || encodingParam == "UTF-16LE"))
|
||||
if ((inputPath.EndsWith(".smi") || inputPath.EndsWith(".sami")) &&
|
||||
(encodingParam.Equals("UTF-16BE", StringComparison.OrdinalIgnoreCase) ||
|
||||
encodingParam.Equals("UTF-16LE", StringComparison.OrdinalIgnoreCase)))
|
||||
{
|
||||
encodingParam = "";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user