diff options
| author | JPVenson <github@jpb.email> | 2025-02-05 18:32:13 +0000 |
|---|---|---|
| committer | JPVenson <github@jpb.email> | 2025-02-05 18:32:13 +0000 |
| commit | dfdef511a5b855ee4e4f079236ff43cb508958d5 (patch) | |
| tree | db2c5d8cfe13817b165c1d24495947d98c25f670 /Jellyfin.Api/Helpers | |
| parent | 078587d232ccbfdf6e08c6f1a6435e4e397e4bdc (diff) | |
| parent | 00b66a06eac4d1331d59a6a9b7de3e99088ebaa9 (diff) | |
Merge remote-tracking branch 'jellyfinorigin/master' into feature/pgsql_provider
Diffstat (limited to 'Jellyfin.Api/Helpers')
| -rw-r--r-- | Jellyfin.Api/Helpers/StreamingHelpers.cs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Jellyfin.Api/Helpers/StreamingHelpers.cs b/Jellyfin.Api/Helpers/StreamingHelpers.cs index 1923393cb..2601fa3be 100644 --- a/Jellyfin.Api/Helpers/StreamingHelpers.cs +++ b/Jellyfin.Api/Helpers/StreamingHelpers.cs @@ -235,6 +235,11 @@ public static class StreamingHelpers state.VideoRequest.MaxHeight = resolution.MaxHeight; } } + + if (state.AudioStream is not null && !EncodingHelper.IsCopyCodec(state.OutputAudioCodec) && string.Equals(state.AudioStream.Codec, state.OutputAudioCodec, StringComparison.OrdinalIgnoreCase) && state.OutputAudioBitrate.HasValue) + { + state.OutputAudioCodec = state.SupportedAudioCodecs.Where(c => !EncodingHelper.LosslessAudioCodecs.Contains(c)).FirstOrDefault(mediaEncoder.CanEncodeToAudioCodec); + } } var ext = string.IsNullOrWhiteSpace(state.OutputContainer) |
