diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2014-02-02 10:25:42 -0500 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2014-02-02 10:25:42 -0500 |
| commit | b28df9a3af8000a991fc6d8c68eeda6b362fc57e (patch) | |
| tree | 5439a11bb0ea714cef83aa77fd49f19d0459b72e | |
| parent | d69894d09bdcb6ce8fef05c932284fa6c82b23e4 (diff) | |
fixed EnforceResolutionLimit to check configuration
| -rw-r--r-- | MediaBrowser.Api/Playback/BaseStreamingService.cs | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/MediaBrowser.Api/Playback/BaseStreamingService.cs b/MediaBrowser.Api/Playback/BaseStreamingService.cs index 81729cbc8..98220e5c6 100644 --- a/MediaBrowser.Api/Playback/BaseStreamingService.cs +++ b/MediaBrowser.Api/Playback/BaseStreamingService.cs @@ -1242,6 +1242,12 @@ namespace MediaBrowser.Api.Playback /// <param name="videoRequest">The video request.</param> private void EnforceResolutionLimit(StreamState state, VideoStreamRequest videoRequest) { + // If enabled, allow whatever the client asks for + if (ServerConfigurationManager.Configuration.AllowVideoUpscaling) + { + return; + } + int? videoWidth = null; int? videoHeight = null; @@ -1269,14 +1275,11 @@ namespace MediaBrowser.Api.Playback } // We don't know the source resolution. Don't allow an exact resolution unless upscaling is allowed - if (!ServerConfigurationManager.Configuration.AllowVideoUpscaling) - { - videoRequest.MaxWidth = videoRequest.MaxWidth ?? videoRequest.Width; - videoRequest.MaxHeight = videoRequest.MaxHeight ?? videoRequest.Height; + videoRequest.MaxWidth = videoRequest.MaxWidth ?? videoRequest.Width; + videoRequest.MaxHeight = videoRequest.MaxHeight ?? videoRequest.Height; - videoRequest.Width = null; - videoRequest.Height = null; - } + videoRequest.Width = null; + videoRequest.Height = null; } protected string GetInputModifier(StreamState state) |
