diff options
| author | gnattu <gnattu@users.noreply.github.com> | 2024-07-17 21:09:30 +0800 |
|---|---|---|
| committer | gnattu <gnattuoc@me.com> | 2024-07-17 21:27:35 +0800 |
| commit | 24910348a1648f9ec05940e3bec137bffa4814a8 (patch) | |
| tree | ae74acc3f33d69a13f72cab2472b3ea723144139 /MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs | |
| parent | d5eb8fc1219fb1566ee28a0cfe693c6e5da6f605 (diff) | |
Force channel to be >= 1
Co-authored-by: Cody Robibero <cody@robibe.ro>
Diffstat (limited to 'MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs')
| -rw-r--r-- | MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs index ce2414cd1..2c35f0a1e 100644 --- a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs +++ b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs @@ -2588,7 +2588,7 @@ namespace MediaBrowser.Controller.MediaEncoding public string GetAudioVbrModeParam(string encoder, int bitrate, int channels) { - var bitratePerChannel = bitrate / channels; + var bitratePerChannel = bitrate / Math.Max(channels, 1); if (string.Equals(encoder, "libfdk_aac", StringComparison.OrdinalIgnoreCase)) { return " -vbr:a " + bitratePerChannel switch |
