mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-08-27 04:16:47 +00:00
omit input container when hw encoding
This commit is contained in:
parent
5d094874e5
commit
a181425e54
4 changed files with 29 additions and 82 deletions
|
|
@ -734,6 +734,16 @@ namespace MediaBrowser.MediaEncoding.Subtitles
|
|||
}
|
||||
}
|
||||
|
||||
var charsetFromLanguage = string.IsNullOrWhiteSpace(language)
|
||||
? null
|
||||
: GetSubtitleFileCharacterSetFromLanguage(language);
|
||||
|
||||
// This assumption should only be made for external subtitles
|
||||
if (!string.IsNullOrWhiteSpace(charsetFromLanguage) && !string.Equals(charsetFromLanguage, "windows-1252", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
return charsetFromLanguage;
|
||||
}
|
||||
|
||||
var charset = await DetectCharset(path, language, protocol, cancellationToken).ConfigureAwait(false);
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(charset))
|
||||
|
|
@ -746,12 +756,7 @@ namespace MediaBrowser.MediaEncoding.Subtitles
|
|||
return charset;
|
||||
}
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(language))
|
||||
{
|
||||
return GetSubtitleFileCharacterSetFromLanguage(language);
|
||||
}
|
||||
|
||||
return null;
|
||||
return charsetFromLanguage;
|
||||
}
|
||||
|
||||
public string GetSubtitleFileCharacterSetFromLanguage(string language)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue