Default to no bitrate limit if no maxBitrate is set (#8850)

Fixes https://github.com/jellyfin/jellyfin/issues/3277
pull/8916/head
Shadowghost 2 years ago committed by GitHub
parent 3f82c90c48
commit 81a7261980
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1450,15 +1450,16 @@ namespace MediaBrowser.Model.Dlna
private bool IsItemBitrateEligibleForDirectPlayback(MediaSourceInfo item, long maxBitrate, PlayMethod playMethod)
{
// Don't restrict by bitrate if coming from an external domain
// Don't restrict bitrate if item is remote.
if (item.IsRemote)
{
return true;
}
long requestedMaxBitrate = maxBitrate > 0 ? maxBitrate : 1000000;
// If no maximum bitrate is set, default to no maximum bitrate.
long requestedMaxBitrate = maxBitrate > 0 ? maxBitrate : int.MaxValue;
// If we don't know the bitrate, then force a transcode if requested max bitrate is under 40 mbps
// If we don't know the item bitrate, then force a transcode if requested max bitrate is under 40 mbps
int itemBitrate = item.Bitrate ?? 40000000;
if (itemBitrate > requestedMaxBitrate)

Loading…
Cancel
Save