aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBond-009 <bond.009@outlook.com>2022-06-23 15:32:35 +0200
committerJoshua Boniface <joshua@boniface.me>2022-06-29 01:26:15 -0400
commit074d7dc6b6d38bb808e4daceec35da617aa1a174 (patch)
treef0a8a1273585556512870e37ac11759523490cf4
parentfe32b5e33353e6154e067c5fb196a36cdecc0cea (diff)
Merge pull request #7968 from jellyfin/fix-hwa-bluray
(cherry picked from commit 5f15339919ebf5db0a9a05c4c98a955e5ca1f4b7) Signed-off-by: Joshua Boniface <joshua@boniface.me>
-rw-r--r--MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs12
1 files changed, 8 insertions, 4 deletions
diff --git a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs
index f795bf2aa..50ffcee11 100644
--- a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs
+++ b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs
@@ -4319,14 +4319,18 @@ namespace MediaBrowser.Controller.MediaEncoding
protected 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;
}