update mp3 transcoding
This commit is contained in:
parent
a8cbea89f1
commit
a35592e0d8
|
@ -721,15 +721,15 @@ namespace MediaBrowser.Api.Playback
|
||||||
|
|
||||||
if (request.MaxAudioChannels.HasValue)
|
if (request.MaxAudioChannels.HasValue)
|
||||||
{
|
{
|
||||||
if (inputChannels.HasValue)
|
|
||||||
{
|
|
||||||
return Math.Min(request.MaxAudioChannels.Value, inputChannels.Value);
|
|
||||||
}
|
|
||||||
|
|
||||||
var channelLimit = codec.IndexOf("mp3", StringComparison.OrdinalIgnoreCase) != -1
|
var channelLimit = codec.IndexOf("mp3", StringComparison.OrdinalIgnoreCase) != -1
|
||||||
? 2
|
? 2
|
||||||
: 6;
|
: 6;
|
||||||
|
|
||||||
|
if (inputChannels.HasValue)
|
||||||
|
{
|
||||||
|
channelLimit = Math.Min(channelLimit, inputChannels.Value);
|
||||||
|
}
|
||||||
|
|
||||||
// If we don't have any media info then limit it to 5 to prevent encoding errors due to asking for too many channels
|
// If we don't have any media info then limit it to 5 to prevent encoding errors due to asking for too many channels
|
||||||
return Math.Min(request.MaxAudioChannels.Value, channelLimit);
|
return Math.Min(request.MaxAudioChannels.Value, channelLimit);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user