mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-07-06 22:32:57 +01:00
Fix StyleCop pattern matching whitespace false-positive
This commit is contained in:
@@ -2759,25 +2759,29 @@ namespace MediaBrowser.Controller.MediaEncoding
|
|||||||
|| string.Equals(audioCodec, "ac3", StringComparison.OrdinalIgnoreCase)
|
|| string.Equals(audioCodec, "ac3", StringComparison.OrdinalIgnoreCase)
|
||||||
|| string.Equals(audioCodec, "eac3", StringComparison.OrdinalIgnoreCase))
|
|| string.Equals(audioCodec, "eac3", StringComparison.OrdinalIgnoreCase))
|
||||||
{
|
{
|
||||||
|
#pragma warning disable SA1008
|
||||||
return (inputChannels, outputChannels) switch
|
return (inputChannels, outputChannels) switch
|
||||||
{
|
{
|
||||||
(>= 6, >= 6 or 0) => Math.Min(640000, bitrate),
|
( >= 6, >= 6 or 0) => Math.Min(640000, bitrate),
|
||||||
(> 0, > 0) => Math.Min(outputChannels * 128000, bitrate),
|
( > 0, > 0) => Math.Min(outputChannels * 128000, bitrate),
|
||||||
(> 0, _) => Math.Min(inputChannels * 128000, bitrate),
|
( > 0, _) => Math.Min(inputChannels * 128000, bitrate),
|
||||||
(_, _) => Math.Min(384000, bitrate)
|
(_, _) => Math.Min(384000, bitrate)
|
||||||
};
|
};
|
||||||
|
#pragma warning restore SA1008
|
||||||
}
|
}
|
||||||
|
|
||||||
if (string.Equals(audioCodec, "dts", StringComparison.OrdinalIgnoreCase)
|
if (string.Equals(audioCodec, "dts", StringComparison.OrdinalIgnoreCase)
|
||||||
|| string.Equals(audioCodec, "dca", StringComparison.OrdinalIgnoreCase))
|
|| string.Equals(audioCodec, "dca", StringComparison.OrdinalIgnoreCase))
|
||||||
{
|
{
|
||||||
|
#pragma warning disable SA1008
|
||||||
return (inputChannels, outputChannels) switch
|
return (inputChannels, outputChannels) switch
|
||||||
{
|
{
|
||||||
(>= 6, >= 6 or 0) => Math.Min(768000, bitrate),
|
( >= 6, >= 6 or 0) => Math.Min(768000, bitrate),
|
||||||
(> 0, > 0) => Math.Min(outputChannels * 136000, bitrate),
|
( > 0, > 0) => Math.Min(outputChannels * 136000, bitrate),
|
||||||
(> 0, _) => Math.Min(inputChannels * 136000, bitrate),
|
( > 0, _) => Math.Min(inputChannels * 136000, bitrate),
|
||||||
(_, _) => Math.Min(672000, bitrate)
|
(_, _) => Math.Min(672000, bitrate)
|
||||||
};
|
};
|
||||||
|
#pragma warning restore SA1008
|
||||||
}
|
}
|
||||||
|
|
||||||
// Empty bitrate area is not allow on iOS
|
// Empty bitrate area is not allow on iOS
|
||||||
|
|||||||
Reference in New Issue
Block a user