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-03 23:49:25 -0500 |
| commit | a35592e0d8c2544f6f914414438e564886cbfebe (patch) | |
| tree | daa7587e061836ad7585104a55a0bbe15a52c1cc | |
| parent | a8cbea89f111d26aa9b964497a848e77b662bd35 (diff) | |
update mp3 transcoding
| -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 a9c5599a3..9e2e399d7 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); } |
