mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-06 11:46:05 +01:00
Backport pull request #15556 from jellyfin/release-10.11.z
Prevent copying HDR streams when only SDR is supported
Original-merge: 1e7e46cb82
Merged-by: crobibero <cody@robibe.ro>
Backported-by: Bond_009 <bond.009@outlook.com>
This commit is contained in:
parent
e4daaf0d83
commit
8cd6ef37c4
1 changed files with 7 additions and 0 deletions
|
|
@ -2378,6 +2378,13 @@ namespace MediaBrowser.Controller.MediaEncoding
|
|||
var requestHasSDR = requestedRangeTypes.Contains(VideoRangeType.SDR.ToString(), StringComparison.OrdinalIgnoreCase);
|
||||
var requestHasDOVI = requestedRangeTypes.Contains(VideoRangeType.DOVI.ToString(), StringComparison.OrdinalIgnoreCase);
|
||||
|
||||
// If SDR is the only supported range, we should not copy any of the HDR streams.
|
||||
// All the following copy check assumes at least one HDR format is supported.
|
||||
if (requestedRangeTypes.Length == 1 && requestHasSDR && videoStream.VideoRangeType != VideoRangeType.SDR)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// If the client does not support DOVI and the video stream is DOVI without fallback, we should not copy it.
|
||||
if (!requestHasDOVI && videoStream.VideoRangeType == VideoRangeType.DOVI)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue