Browse Source

Update MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs

Co-authored-by: Cody Robibero <cody@robibe.ro>
Isaac Gordezky 3 years ago
parent
commit
def8500dd0
1 changed files with 3 additions and 2 deletions
  1. 3 2
      MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs

+ 3 - 2
MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs

@@ -1677,8 +1677,9 @@ namespace MediaBrowser.Controller.MediaEncoding
             }
             }
 
 
             // Source and target codecs must match
             // Source and target codecs must match
-            if (string.IsNullOrEmpty(videoStream.Codec) || (state.SupportedVideoCodecs.Any()
-                && !state.SupportedVideoCodecs.Contains(videoStream.Codec, StringComparison.OrdinalIgnoreCase)))
+            if (string.IsNullOrEmpty(videoStream.Codec)
+                || (state.SupportedVideoCodecs.Length != 0
+                    && !state.SupportedVideoCodecs.Contains(videoStream.Codec, StringComparison.OrdinalIgnoreCase)))
             {
             {
                 return false;
                 return false;
             }
             }