浏览代码

Merge pull request #7968 from jellyfin/fix-hwa-bluray

(cherry picked from commit 5f15339919ebf5db0a9a05c4c98a955e5ca1f4b7)
Signed-off-by: Joshua Boniface <joshua@boniface.me>
Bond-009 3 年之前
父节点
当前提交
074d7dc6b6
共有 1 个文件被更改,包括 8 次插入4 次删除
  1. 8 4
      MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs

+ 8 - 4
MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs

@@ -4319,14 +4319,18 @@ namespace MediaBrowser.Controller.MediaEncoding
         protected string GetHardwareVideoDecoder(EncodingJobInfo state, EncodingOptions options)
         protected string GetHardwareVideoDecoder(EncodingJobInfo state, EncodingOptions options)
         {
         {
             var videoStream = state.VideoStream;
             var videoStream = state.VideoStream;
-            if (videoStream == null)
+            var mediaSource = state.MediaSource;
+            if (videoStream == null || mediaSource == null)
             {
             {
                 return null;
                 return null;
             }
             }
 
 
-            // Only use alternative encoders for video files.
-            var videoType = state.MediaSource.VideoType ?? VideoType.VideoFile;
-            if (videoType != VideoType.VideoFile)
+            // HWA decoders can handle both video files and video folders.
+            var videoType = mediaSource.VideoType;
+            if (videoType != VideoType.VideoFile
+                && videoType != VideoType.Iso
+                && videoType != VideoType.Dvd
+                && videoType != VideoType.BluRay)
             {
             {
                 return null;
                 return null;
             }
             }