소스 검색

Fix vpp null reference

crobibero 4 년 전
부모
커밋
0cce843f07
1개의 변경된 파일6개의 추가작업 그리고 0개의 파일을 삭제
  1. 6 0
      MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs

+ 6 - 0
MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs

@@ -131,6 +131,12 @@ namespace MediaBrowser.Controller.MediaEncoding
         private bool IsVppTonemappingSupported(EncodingJobInfo state, EncodingOptions options)
         {
             var videoStream = state.VideoStream;
+            if (videoStream == null)
+            {
+                // Remote stream doesn't have media info, disable vpp tonemapping.
+                return false;
+            }
+
             var codec = videoStream.Codec;
             if (string.Equals(options.HardwareAccelerationType, "vaapi", StringComparison.OrdinalIgnoreCase))
             {