Skip to content

The Free Software Media System - Server Backend & API

allow empty video encoder profile

Nyanmisakaac03ef57c927
diff --git a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs
index a8a094e63d..73ede7c5a4 100644
--- a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs
+++ b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs
@@ -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)