Преглед изворни кода

allow empty video encoder profile

Co-authored-by: Cody Robibero <cody@robibe.ro>
Nyanmisaka пре 4 година
родитељ
комит
ac03ef57c9
1 измењених фајлова са 2 додато и 2 уклоњено
  1. 2 2
      MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs

+ 2 - 2
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)