Backport pull request #9092 from jellyfin/release-10.8.z
Don't add additional entries if HEVC encoding is disabled Original-merge: 2a5efeb3bb5938b614cb159868e98d56487040c9 Merged-by: Dmitry Lyzo <56478732+dmitrylyzo@users.noreply.github.com> Backported-by: Joshua M. Boniface <joshua@boniface.me>
This commit is contained in:
parent
2b1a7ddd32
commit
71a708cdb8
|
@ -9,6 +9,7 @@ using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Jellyfin.Api.Extensions;
|
using Jellyfin.Api.Extensions;
|
||||||
using Jellyfin.Api.Models.StreamingDtos;
|
using Jellyfin.Api.Models.StreamingDtos;
|
||||||
|
using MediaBrowser.Common.Configuration;
|
||||||
using MediaBrowser.Common.Extensions;
|
using MediaBrowser.Common.Extensions;
|
||||||
using MediaBrowser.Common.Net;
|
using MediaBrowser.Common.Net;
|
||||||
using MediaBrowser.Controller.Configuration;
|
using MediaBrowser.Controller.Configuration;
|
||||||
|
@ -203,9 +204,11 @@ namespace Jellyfin.Api.Helpers
|
||||||
{
|
{
|
||||||
builder.Append(flacWaPlaylist);
|
builder.Append(flacWaPlaylist);
|
||||||
}
|
}
|
||||||
|
var encodingOptions = _serverConfigurationManager.GetEncodingOptions();
|
||||||
|
|
||||||
// Provide SDR HEVC entrance for backward compatibility.
|
// 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.IsNullOrEmpty(state.VideoStream.VideoRange)
|
||||||
&& string.Equals(state.VideoStream.VideoRange, "HDR", StringComparison.OrdinalIgnoreCase)
|
&& string.Equals(state.VideoStream.VideoRange, "HDR", StringComparison.OrdinalIgnoreCase)
|
||||||
&& string.Equals(state.ActualOutputVideoCodec, "hevc", StringComparison.OrdinalIgnoreCase))
|
&& string.Equals(state.ActualOutputVideoCodec, "hevc", StringComparison.OrdinalIgnoreCase))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user