aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2014-02-02 21:11:25 -0500
committerLuke Pulverenti <luke.pulverenti@gmail.com>2014-02-02 21:11:25 -0500
commit6261f157f340e4f544f8f41a81b3cc1f2c69f5b1 (patch)
tree915d797f590b47424414a2ffad2faed66764518f
parent8b3485968f183777d5727e93413f690d1493316f (diff)
removed resolution exception
-rw-r--r--MediaBrowser.Api/Playback/BaseStreamingService.cs28
1 files changed, 1 insertions, 27 deletions
diff --git a/MediaBrowser.Api/Playback/BaseStreamingService.cs b/MediaBrowser.Api/Playback/BaseStreamingService.cs
index 4f85f1922..fa44a1998 100644
--- a/MediaBrowser.Api/Playback/BaseStreamingService.cs
+++ b/MediaBrowser.Api/Playback/BaseStreamingService.cs
@@ -1276,33 +1276,7 @@ namespace MediaBrowser.Api.Playback
return;
}
- int? videoWidth = null;
- int? videoHeight = null;
-
- // Grab the values from the source video, if we have them
- if (state.VideoStream != null)
- {
- videoWidth = state.VideoStream.Width;
- videoHeight = state.VideoStream.Height;
- }
-
- if (videoRequest.Width.HasValue && videoWidth.HasValue)
- {
- if (videoRequest.Width.Value > videoWidth.Value)
- {
- throw new ArgumentException("Video upscaling has not been enabled by the user");
- }
- }
-
- if (videoRequest.Height.HasValue && videoHeight.HasValue)
- {
- if (videoRequest.Height.Value > videoHeight.Value)
- {
- throw new ArgumentException("Video upscaling has not been enabled by the user");
- }
- }
-
- // We don't know the source resolution. Don't allow an exact resolution unless upscaling is allowed
+ // Switch the incoming params to be ceilings rather than fixed values
videoRequest.MaxWidth = videoRequest.MaxWidth ?? videoRequest.Width;
videoRequest.MaxHeight = videoRequest.MaxHeight ?? videoRequest.Height;