Explorar o código

remove audio channel limit from transcoding conditions

Luke Pulverenti %!s(int64=8) %!d(string=hai) anos
pai
achega
7debfaa4bd
Modificáronse 1 ficheiros con 2 adicións e 5 borrados
  1. 2 5
      MediaBrowser.Api/Playback/BaseStreamingService.cs

+ 2 - 5
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;