From bfda416579337e559dff8b8838f75137f00bbbf6 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Wed, 16 Dec 2015 00:13:16 -0500 Subject: [PATCH] update resizing params --- MediaBrowser.Api/Playback/BaseStreamingService.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MediaBrowser.Api/Playback/BaseStreamingService.cs b/MediaBrowser.Api/Playback/BaseStreamingService.cs index fa230473b..7939a5976 100644 --- a/MediaBrowser.Api/Playback/BaseStreamingService.cs +++ b/MediaBrowser.Api/Playback/BaseStreamingService.cs @@ -547,7 +547,7 @@ namespace MediaBrowser.Api.Playback { var heightParam = request.Height.Value.ToString(UsCulture); - filters.Add(string.Format("scale=trunc(oh*a*2)/2:{0}", heightParam)); + filters.Add(string.Format("scale=trunc(oh*a/2)*2:{0}", heightParam)); } // If a max width was requested @@ -555,7 +555,7 @@ namespace MediaBrowser.Api.Playback { var maxWidthParam = request.MaxWidth.Value.ToString(UsCulture); - filters.Add(string.Format("scale=min(iw\\,{0}):trunc(ow/dar/2)*2", maxWidthParam)); + filters.Add(string.Format("scale=trunc(min(max(iw\\,ih*dar)\\,{0})/2)*2:trunc(ow/dar/2)*2", maxWidthParam)); } // If a max height was requested