mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-06-03 05:34:16 -04:00
Force channel to be >= 1
Co-authored-by: Cody Robibero <cody@robibe.ro>
This commit is contained in:
parent
d5eb8fc121
commit
24910348a1
@ -2588,7 +2588,7 @@ namespace MediaBrowser.Controller.MediaEncoding
|
|||||||
|
|
||||||
public string GetAudioVbrModeParam(string encoder, int bitrate, int channels)
|
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))
|
if (string.Equals(encoder, "libfdk_aac", StringComparison.OrdinalIgnoreCase))
|
||||||
{
|
{
|
||||||
return " -vbr:a " + bitratePerChannel switch
|
return " -vbr:a " + bitratePerChannel switch
|
||||||
|
Loading…
x
Reference in New Issue
Block a user