diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2016-10-27 23:15:34 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2016-10-30 01:32:23 -0400 |
| commit | 7debfaa4bdc849c8577c26f4caec78a763328c29 (patch) | |
| tree | 6c36f10d7dd25dc685fac9b0c89cfb9ecd4992b0 | |
| parent | 6b0a59c7dbc038b69788d7457e2a775682a40af6 (diff) | |
remove audio channel limit from transcoding conditions
| -rw-r--r-- | MediaBrowser.Api/Playback/BaseStreamingService.cs | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/MediaBrowser.Api/Playback/BaseStreamingService.cs b/MediaBrowser.Api/Playback/BaseStreamingService.cs index dc26218a5..2fcfa90bd 100644 --- a/MediaBrowser.Api/Playback/BaseStreamingService.cs +++ b/MediaBrowser.Api/Playback/BaseStreamingService.cs @@ -886,12 +886,9 @@ namespace MediaBrowser.Api.Playback resultChannels = Math.Min(request.MaxAudioChannels.Value, channelLimit); } - if (resultChannels.HasValue && !string.Equals(codec, "copy", StringComparison.OrdinalIgnoreCase)) + if (request.TranscodingMaxAudioChannels.HasValue && !string.Equals(codec, "copy", StringComparison.OrdinalIgnoreCase)) { - if (request.TranscodingMaxAudioChannels.HasValue) - { - resultChannels = Math.Min(request.TranscodingMaxAudioChannels.Value, resultChannels.Value); - } + resultChannels = Math.Min(request.TranscodingMaxAudioChannels.Value, resultChannels ?? inputChannels ?? request.TranscodingMaxAudioChannels.Value); } return resultChannels ?? request.AudioChannels; |
