mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-05-03 15:26:34 +01:00
improve live stream pinging
This commit is contained in:
@@ -49,7 +49,7 @@ namespace MediaBrowser.Model.Configuration
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if [enable user specific user views]; otherwise, <c>false</c>.</value>
|
||||
public bool EnableUserSpecificUserViews { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the value pointing to the file system where the ssl certiifcate is located..
|
||||
/// </summary>
|
||||
|
||||
@@ -456,10 +456,8 @@ namespace MediaBrowser.Model.Dlna
|
||||
playlistItem.MaxAudioChannels = Math.Min(options.MaxAudioChannels.Value, currentValue);
|
||||
}
|
||||
|
||||
if (!playlistItem.AudioBitrate.HasValue)
|
||||
{
|
||||
playlistItem.AudioBitrate = GetAudioBitrate(playlistItem.TargetAudioChannels, playlistItem.TargetAudioCodec);
|
||||
}
|
||||
int audioBitrate = GetAudioBitrate(playlistItem.TargetAudioChannels, playlistItem.TargetAudioCodec);
|
||||
playlistItem.AudioBitrate = Math.Min(playlistItem.AudioBitrate ?? audioBitrate, audioBitrate);
|
||||
|
||||
int? maxBitrateSetting = options.GetMaxBitrate();
|
||||
// Honor max rate
|
||||
@@ -472,9 +470,9 @@ namespace MediaBrowser.Model.Dlna
|
||||
videoBitrate -= playlistItem.AudioBitrate.Value;
|
||||
}
|
||||
|
||||
// Make sure the video bitrate is lower than bitrate settings but at least 64k
|
||||
int currentValue = playlistItem.VideoBitrate ?? videoBitrate;
|
||||
|
||||
playlistItem.VideoBitrate = Math.Min(videoBitrate, currentValue);
|
||||
playlistItem.VideoBitrate = Math.Max(Math.Min(videoBitrate, currentValue), 64000);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user