aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Api/Playback/BaseStreamingService.cs
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2014-10-06 19:58:46 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2014-10-06 19:58:46 -0400
commitf02f3222085311b2a2cacab6642ad987a4176e65 (patch)
tree9f317e5a3f087d4b4c5e523a8d8552d7d248567e /MediaBrowser.Api/Playback/BaseStreamingService.cs
parenta9eed234ba2a366fe014f0cc6f462c3764528948 (diff)
remove mono compiler directives
Diffstat (limited to 'MediaBrowser.Api/Playback/BaseStreamingService.cs')
-rw-r--r--MediaBrowser.Api/Playback/BaseStreamingService.cs11
1 files changed, 11 insertions, 0 deletions
diff --git a/MediaBrowser.Api/Playback/BaseStreamingService.cs b/MediaBrowser.Api/Playback/BaseStreamingService.cs
index cb95049ce..734b6a939 100644
--- a/MediaBrowser.Api/Playback/BaseStreamingService.cs
+++ b/MediaBrowser.Api/Playback/BaseStreamingService.cs
@@ -1645,6 +1645,17 @@ namespace MediaBrowser.Api.Playback
{
state.OutputVideoCodec = GetVideoCodec(videoRequest);
state.OutputVideoBitrate = GetVideoBitrateParamValue(state.VideoRequest, state.VideoStream);
+
+ if (state.OutputVideoBitrate.HasValue)
+ {
+ var resolution = ResolutionNormalizer.Normalize(state.OutputVideoBitrate.Value,
+ state.OutputVideoCodec,
+ videoRequest.MaxWidth,
+ videoRequest.MaxHeight);
+
+ videoRequest.MaxWidth = resolution.MaxWidth;
+ videoRequest.MaxHeight = resolution.MaxHeight;
+ }
}
ApplyDeviceProfileSettings(state);