aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Api/Helpers
diff options
context:
space:
mode:
authorgnattu <gnattu@users.noreply.github.com>2024-04-23 00:23:36 +0800
committerGitHub <noreply@github.com>2024-04-22 10:23:36 -0600
commit374b6ca0e22719df25b8d0aa51c510515b928104 (patch)
tree586c2d8276b15a2d22115f4f0abd52df355df421 /Jellyfin.Api/Helpers
parent09b02296700e8a2affa17555062516206e543f7c (diff)
Only apply custom downmix to 5.1 audios (#11401)
Diffstat (limited to 'Jellyfin.Api/Helpers')
-rw-r--r--Jellyfin.Api/Helpers/StreamingHelpers.cs7
1 files changed, 3 insertions, 4 deletions
diff --git a/Jellyfin.Api/Helpers/StreamingHelpers.cs b/Jellyfin.Api/Helpers/StreamingHelpers.cs
index d6d7a56eb..6cd466da0 100644
--- a/Jellyfin.Api/Helpers/StreamingHelpers.cs
+++ b/Jellyfin.Api/Helpers/StreamingHelpers.cs
@@ -166,6 +166,9 @@ public static class StreamingHelpers
}
var outputAudioCodec = streamingRequest.AudioCodec;
+ state.OutputAudioCodec = outputAudioCodec;
+ state.OutputContainer = (containerInternal ?? string.Empty).TrimStart('.');
+ state.OutputAudioChannels = encodingHelper.GetNumAudioChannelsParam(state, state.AudioStream, state.OutputAudioCodec);
if (EncodingHelper.LosslessAudioCodecs.Contains(outputAudioCodec))
{
state.OutputAudioBitrate = state.AudioStream.BitRate ?? 0;
@@ -180,10 +183,6 @@ public static class StreamingHelpers
containerInternal = ".pcm";
}
- state.OutputAudioCodec = outputAudioCodec;
- state.OutputContainer = (containerInternal ?? string.Empty).TrimStart('.');
- state.OutputAudioChannels = encodingHelper.GetNumAudioChannelsParam(state, state.AudioStream, state.OutputAudioCodec);
-
if (state.VideoRequest is not null)
{
state.OutputVideoCodec = state.Request.VideoCodec;