The Free Software Media System - Server Backend & API
Merge pull request #7968 from jellyfin/fix-hwa-bluray
Bond-009074d7dc6b6d3
diff --git a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.csindex f795bf2aa8..50ffcee116 100644--- a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs+++ b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs@@ -4319,14 +4319,18 @@ namespace MediaBrowser.Controller.MediaEncodingprotected string GetHardwareVideoDecoder(EncodingJobInfo state, EncodingOptions options){var videoStream = state.VideoStream;- if (videoStream == null)+ var mediaSource = state.MediaSource;+ if (videoStream == null || mediaSource == 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;}