allow empty video encoder profile

Co-authored-by: Cody Robibero <cody@robibe.ro>
pull/4816/head
Nyanmisaka 4 years ago committed by GitHub
parent cf8aa37f5b
commit ac03ef57c9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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)

Loading…
Cancel
Save