diff options
| author | Shadowghost <Ghost_of_Stone@web.de> | 2023-01-24 23:48:47 +0100 |
|---|---|---|
| committer | Shadowghost <Ghost_of_Stone@web.de> | 2023-01-24 23:48:47 +0100 |
| commit | 414eb45899253cd0530b35b6f93044111c7b225e (patch) | |
| tree | d4c56990d7bcd651d965fa9376fe678053fcc063 /Jellyfin.Api/Helpers/DynamicHlsHelper.cs | |
| parent | a728f0993e873e8baa719e2ce51d8b80e43bb876 (diff) | |
| parent | 6b006a576dc5b708ec57615ea8b65586a6183ee2 (diff) | |
Merge branch 'master' into network-rewrite
Diffstat (limited to 'Jellyfin.Api/Helpers/DynamicHlsHelper.cs')
| -rw-r--r-- | Jellyfin.Api/Helpers/DynamicHlsHelper.cs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Jellyfin.Api/Helpers/DynamicHlsHelper.cs b/Jellyfin.Api/Helpers/DynamicHlsHelper.cs index 010b181f7..4a338efff 100644 --- a/Jellyfin.Api/Helpers/DynamicHlsHelper.cs +++ b/Jellyfin.Api/Helpers/DynamicHlsHelper.cs @@ -9,6 +9,7 @@ using System.Threading; using System.Threading.Tasks; using Jellyfin.Api.Extensions; using Jellyfin.Api.Models.StreamingDtos; +using MediaBrowser.Common.Configuration; using MediaBrowser.Common.Extensions; using MediaBrowser.Common.Net; using MediaBrowser.Controller.Configuration; @@ -204,8 +205,11 @@ namespace Jellyfin.Api.Helpers builder.Append(flacWaPlaylist); } + var encodingOptions = _serverConfigurationManager.GetEncodingOptions(); + // Provide SDR HEVC entrance for backward compatibility. - if (EncodingHelper.IsCopyCodec(state.OutputVideoCodec) + if (encodingOptions.AllowHevcEncoding + && EncodingHelper.IsCopyCodec(state.OutputVideoCodec) && !string.IsNullOrEmpty(state.VideoStream.VideoRange) && string.Equals(state.VideoStream.VideoRange, "HDR", StringComparison.OrdinalIgnoreCase) && string.Equals(state.ActualOutputVideoCodec, "hevc", StringComparison.OrdinalIgnoreCase)) |
