aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs
diff options
context:
space:
mode:
authorIsaac Gordezky <eye.zak@gmail.com>2022-01-23 23:49:14 +0000
committerCody Robibero <cody@robibe.ro>2022-03-06 18:13:54 -0700
commit5e779f20ee88de93b75d06b255c93d0196c1255b (patch)
treed21cb48357634c9de3f1bf25fbb0f6f6b2d40bac /MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs
parentd871dded9fc7b704f778764a73830ae6a481f3ff (diff)
Series: issue-6450
Issue: https://github.com/jellyfin/jellyfin/issues/6450 Enable DirectPlay responses Rewrite DirectPlay and DirectStream resolution Prefer copy transcode video codec options Enhance condition processor Support DirectStream and Transcode with parity Rework audio stream selection and add tests for ExternalAudio Update MediaInfoHelper to only call StreamBuilder once
Diffstat (limited to 'MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs')
-rw-r--r--MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs16
1 files changed, 5 insertions, 11 deletions
diff --git a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs
index f7248acac..b4aff60e1 100644
--- a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs
+++ b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs
@@ -1798,7 +1798,7 @@ namespace MediaBrowser.Controller.MediaEncoding
return false;
}
- return request.EnableAutoStreamCopy;
+ return true;
}
public bool CanStreamCopyAudio(EncodingJobInfo state, MediaStream audioStream, IEnumerable<string> supportedAudioCodecs)
@@ -1855,17 +1855,11 @@ namespace MediaBrowser.Controller.MediaEncoding
}
// Video bitrate must fall within requested value
- if (request.AudioBitRate.HasValue)
+ if (request.AudioBitRate.HasValue
+ && audioStream.BitDepth.HasValue
+ && audioStream.BitRate.Value > request.AudioBitRate.Value)
{
- if (!audioStream.BitRate.HasValue || audioStream.BitRate.Value <= 0)
- {
- return false;
- }
-
- if (audioStream.BitRate.Value > request.AudioBitRate.Value)
- {
- return false;
- }
+ return false;
}
return request.EnableAutoStreamCopy;