allow empty video encoder profile

Co-authored-by: Cody Robibero <cody@robibe.ro>
This commit is contained in:
Nyanmisaka 2020-12-19 01:47:31 +08:00 committed by GitHub
parent cf8aa37f5b
commit ac03ef57c9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -1127,8 +1127,8 @@ namespace MediaBrowser.Controller.MediaEncoding
targetVideoCodec = "hevc";
}
var profile = state.GetRequestedProfiles(targetVideoCodec).FirstOrDefault();
profile = Regex.Replace(profile, @"\s+", String.Empty);
var profile = state.GetRequestedProfiles(targetVideoCodec).FirstOrDefault() ?? string.Empty;
profile = Regex.Replace(profile, @"\s+", string.Empty);
// We only transcode to HEVC 8-bit for now, force Main Profile.
if (profile.Contains("main 10", StringComparison.OrdinalIgnoreCase)