summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF/Helpers/PictureSize.cs
diff options
context:
space:
mode:
authorsr55 <[email protected]>2014-12-20 14:49:37 +0000
committersr55 <[email protected]>2014-12-20 14:49:37 +0000
commit1242ef643baa3d47818774058116cc185985b5da (patch)
tree14906f805c4c2335f3d0602ea0c25e33d0fa2676 /win/CS/HandBrakeWPF/Helpers/PictureSize.cs
parent064322050804f20792408bcd45609276d4ba4240 (diff)
WinGui: Fix a bug in the anamorphic size code.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6623 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrakeWPF/Helpers/PictureSize.cs')
-rw-r--r--win/CS/HandBrakeWPF/Helpers/PictureSize.cs17
1 files changed, 5 insertions, 12 deletions
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
/// </returns>
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 };
}