mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-04-24 05:57:20 -04:00
Fix the issue that HEVC transcoding can't be disabled
This commit is contained in:
parent
3229ba4918
commit
4b1256e67b
1 changed files with 9 additions and 2 deletions
|
@ -771,10 +771,17 @@ namespace MediaBrowser.Model.Dlna
|
|||
|
||||
private void BuildStreamVideoItem(StreamInfo playlistItem, VideoOptions options, MediaSourceInfo item, MediaStream videoStream, MediaStream audioStream, IEnumerable<MediaStream> candidateAudioStreams, string container, string videoCodec, string audioCodec)
|
||||
{
|
||||
// prefer matching video codecs
|
||||
var videoCodecs = ContainerProfile.SplitValue(videoCodec);
|
||||
var directVideoCodec = ContainerProfile.ContainsContainer(videoCodecs, videoStream?.Codec) ? videoStream?.Codec : null;
|
||||
playlistItem.VideoCodecs = directVideoCodec != null ? new[] { directVideoCodec } : videoCodecs;
|
||||
if (directVideoCodec != null)
|
||||
{
|
||||
// merge directVideoCodec to videoCodecs
|
||||
videoCodecs = videoCodecs != null && videoCodecs.Length > 0
|
||||
? videoCodecs.Union(new[] { directVideoCodec }).ToArray()
|
||||
: new[] { directVideoCodec };
|
||||
}
|
||||
|
||||
playlistItem.VideoCodecs = videoCodecs;
|
||||
|
||||
// copy video codec options as a starting point, this applies to transcode and direct-stream
|
||||
playlistItem.MaxFramerate = videoStream?.AverageFrameRate;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue