diff options
| author | Bond_009 <bond.009@outlook.com> | 2019-01-21 16:57:10 +0100 |
|---|---|---|
| committer | Bond_009 <bond.009@outlook.com> | 2019-01-21 16:57:10 +0100 |
| commit | 2f8f9e68533d7ddff804738451b321d5307c7aec (patch) | |
| tree | f64ea53f1f30a912af225b8b443d147d82bde9a0 | |
| parent | 06d9423f00d7577c74ac6d0e0a14da02394b5885 (diff) | |
Address comments
| -rw-r--r-- | MediaBrowser.Model/Dlna/StreamBuilder.cs | 25 |
1 files changed, 7 insertions, 18 deletions
diff --git a/MediaBrowser.Model/Dlna/StreamBuilder.cs b/MediaBrowser.Model/Dlna/StreamBuilder.cs index 8f0120a0d..6c6e09ab1 100644 --- a/MediaBrowser.Model/Dlna/StreamBuilder.cs +++ b/MediaBrowser.Model/Dlna/StreamBuilder.cs @@ -149,13 +149,9 @@ namespace MediaBrowser.Model.Dlna { switch (condition.Property) { - case ProfileConditionValue.AudioBitrate when condition.Condition == ProfileConditionType.LessThanEqual: - return TranscodeReason.AudioBitrateNotSupported; case ProfileConditionValue.AudioBitrate: return TranscodeReason.AudioBitrateNotSupported; - case ProfileConditionValue.AudioChannels when condition.Condition == ProfileConditionType.LessThanEqual: - return TranscodeReason.AudioChannelsNotSupported; case ProfileConditionValue.AudioChannels: return TranscodeReason.AudioChannelsNotSupported; @@ -898,7 +894,7 @@ namespace MediaBrowser.Model.Dlna if (targetAudioChannels.HasValue && audioStream.Channels.HasValue && targetAudioChannels.Value < audioStream.Channels.Value) { // Reduce the bitrate if we're downmixing - defaultBitrate = targetAudioChannels.Value <= 2 ? 128000 : 192000; + defaultBitrate = targetAudioChannels.Value < 2 ? 128000 : 192000; } else { @@ -1252,27 +1248,20 @@ namespace MediaBrowser.Model.Dlna { if (!string.IsNullOrEmpty(transcodingContainer)) { - var normalizedContainers = ContainerProfile.SplitValue(transcodingContainer); + string[] normalizedContainers = ContainerProfile.SplitValue(transcodingContainer); - if (ContainerProfile.ContainsContainer(normalizedContainers, "ts")) - { - return false; - } - else if (ContainerProfile.ContainsContainer(normalizedContainers, "mpegts")) + if (ContainerProfile.ContainsContainer(normalizedContainers, "ts") + || ContainerProfile.ContainsContainer(normalizedContainers, "mpegts") + || ContainerProfile.ContainsContainer(normalizedContainers, "mp4")) { return false; } - else if (ContainerProfile.ContainsContainer(normalizedContainers, "mp4")) - { - return false; - } - else if (ContainerProfile.ContainsContainer(normalizedContainers, "mkv") || - ContainerProfile.ContainsContainer(normalizedContainers, "matroska")) + else if (ContainerProfile.ContainsContainer(normalizedContainers, "mkv") + || ContainerProfile.ContainsContainer(normalizedContainers, "matroska")) { return true; } } - return false; } |
