From 1242ef643baa3d47818774058116cc185985b5da Mon Sep 17 00:00:00 2001 From: sr55 Date: Sat, 20 Dec 2014 14:49:37 +0000 Subject: WinGui: Fix a bug in the anamorphic size code. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6623 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- win/CS/HandBrakeWPF/Helpers/PictureSize.cs | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) (limited to 'win/CS/HandBrakeWPF/Helpers/PictureSize.cs') diff --git a/win/CS/HandBrakeWPF/Helpers/PictureSize.cs b/win/CS/HandBrakeWPF/Helpers/PictureSize.cs index f7dc3aeac..6961ae64f 100644 --- a/win/CS/HandBrakeWPF/Helpers/PictureSize.cs +++ b/win/CS/HandBrakeWPF/Helpers/PictureSize.cs @@ -9,9 +9,7 @@ namespace HandBrakeWPF.Helpers { - using System; using System.Diagnostics; - using System.Runtime.InteropServices; using HandBrake.Interop.HbLib; using HandBrake.Interop.Model; @@ -177,11 +175,6 @@ namespace HandBrakeWPF.Helpers /// public static AnamorphicResult hb_set_anamorphic_size2(PictureSettingsJob job, PictureSettingsTitle title, KeepSetting setting) { - int outputHeight = 0; - int outputParHeight = 0; - int outputParWidth = 0; - int outputWidth = 0; - int settingMode = (int)setting + (job.KeepDisplayAspect ? 0x04 : 0); hb_geometry_settings_s uiGeometry = new hb_geometry_settings_s @@ -193,7 +186,7 @@ namespace HandBrakeWPF.Helpers maxHeight = job.MaxHeight, mode = (int)(hb_anamorphic_mode_t)job.AnamorphicMode, modulus = job.Modulus.HasValue ? job.Modulus.Value : 16, - geometry = new hb_geometry_s() { height = job.Height, width = job.Width, par = job.AnamorphicMode != Anamorphic.Custom ? new hb_rational_t { den = title.ParH, num = title.ParW } : new hb_rational_t { den = job.ParH, num = job.ParW }} + geometry = new hb_geometry_s { height = job.Height, width = job.Width, par = job.AnamorphicMode != Anamorphic.Custom ? new hb_rational_t { den = title.ParH, num = title.ParW } : new hb_rational_t { den = job.ParH, num = job.ParW }} }; hb_geometry_s sourceGeometry = new hb_geometry_s @@ -207,10 +200,10 @@ namespace HandBrakeWPF.Helpers HBFunctions.hb_set_anamorphic_size2(ref sourceGeometry, ref uiGeometry, ref result); - outputWidth = result.width; - outputHeight = result.height; - outputParWidth = result.par.den; - outputParHeight = result.par.num; + int outputWidth = result.width; + int outputHeight = result.height; + int outputParWidth = result.par.num; + int outputParHeight = result.par.den; Debug.WriteLine("hb_set_anamorphic_size2: {0}x{1}", outputWidth, outputHeight); return new AnamorphicResult { OutputWidth = outputWidth, OutputHeight = outputHeight, OutputParWidth = outputParWidth, OutputParHeight = outputParHeight }; } -- cgit v1.2.3