diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2016-01-03 16:35:19 -0500 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2016-01-04 12:47:00 -0500 |
| commit | 6f53f7ee1d68402289edca48591bc28eb6d9c175 (patch) | |
| tree | 850c18de3833c32ca20bbf726183e4e0dacd86c8 /MediaBrowser.Api/Playback/BaseStreamingService.cs | |
| parent | 24f86b72aa6e0da3bbf731aeb7f47f9e045bf1e7 (diff) | |
update mp3 transcoding
Diffstat (limited to 'MediaBrowser.Api/Playback/BaseStreamingService.cs')
| -rw-r--r-- | MediaBrowser.Api/Playback/BaseStreamingService.cs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/MediaBrowser.Api/Playback/BaseStreamingService.cs b/MediaBrowser.Api/Playback/BaseStreamingService.cs index 9eb0f7d45..4de29b3f2 100644 --- a/MediaBrowser.Api/Playback/BaseStreamingService.cs +++ b/MediaBrowser.Api/Playback/BaseStreamingService.cs @@ -721,15 +721,15 @@ namespace MediaBrowser.Api.Playback if (request.MaxAudioChannels.HasValue) { + var channelLimit = codec.IndexOf("mp3", StringComparison.OrdinalIgnoreCase) != -1 + ? 2 + : 6; + if (inputChannels.HasValue) { - return Math.Min(request.MaxAudioChannels.Value, inputChannels.Value); + channelLimit = Math.Min(channelLimit, inputChannels.Value); } - var channelLimit = codec.IndexOf("mp3", StringComparison.OrdinalIgnoreCase) != -1 - ? 2 - : 6; - // If we don't have any media info then limit it to 5 to prevent encoding errors due to asking for too many channels return Math.Min(request.MaxAudioChannels.Value, channelLimit); } |
