]> granicus.if.org Git - handbrake/commitdiff
WinGui: Fix a bug in the anamorphic size code.
authorsr55 <sr55.hb@outlook.com>
Sat, 20 Dec 2014 14:49:37 +0000 (14:49 +0000)
committersr55 <sr55.hb@outlook.com>
Sat, 20 Dec 2014 14:49:37 +0000 (14:49 +0000)
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6623 b64f7644-9d1e-0410-96f1-a4d463321fa5

win/CS/HandBrake.Interop/HandBrakeInterop/HandBrakeInterop.csproj
win/CS/HandBrakeWPF/Helpers/PictureSize.cs

index 2b70bb55a393f48dd8ce7345c8158d7196cac663..f722cdabd2e41e7806b65511e49dcec9daa6144b 100644 (file)
       <Install>true</Install>\r
     </BootstrapperPackage>\r
   </ItemGroup>\r
-  <ItemGroup>\r
-    <Folder Include="SourceData\" />\r
-  </ItemGroup>\r
+  <ItemGroup />\r
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />\r
   <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \r
        Other similar extension points exist, see Microsoft.Common.targets.\r
index f7dc3aeac80e2af629fa847746296c9eb8cbd592..6961ae64fb378c920782919a7b4daff8ec6851e5 100644 (file)
@@ -9,9 +9,7 @@
 \r
 namespace HandBrakeWPF.Helpers\r
 {\r
-    using System;\r
     using System.Diagnostics;\r
-    using System.Runtime.InteropServices;\r
 \r
     using HandBrake.Interop.HbLib;\r
     using HandBrake.Interop.Model;\r
@@ -177,11 +175,6 @@ namespace HandBrakeWPF.Helpers
         /// </returns>\r
         public static AnamorphicResult hb_set_anamorphic_size2(PictureSettingsJob job, PictureSettingsTitle title, KeepSetting setting)\r
         {\r
-            int outputHeight = 0;\r
-            int outputParHeight = 0;\r
-            int outputParWidth = 0;\r
-            int outputWidth = 0;\r
-\r
             int settingMode = (int)setting + (job.KeepDisplayAspect ? 0x04 : 0);\r
 \r
             hb_geometry_settings_s uiGeometry = new hb_geometry_settings_s\r
@@ -193,7 +186,7 @@ namespace HandBrakeWPF.Helpers
                 maxHeight = job.MaxHeight,\r
                 mode = (int)(hb_anamorphic_mode_t)job.AnamorphicMode,\r
                 modulus = job.Modulus.HasValue ? job.Modulus.Value : 16,\r
-                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 }}\r
+                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 }}\r
             };\r
 \r
             hb_geometry_s sourceGeometry = new hb_geometry_s\r
@@ -207,10 +200,10 @@ namespace HandBrakeWPF.Helpers
 \r
             HBFunctions.hb_set_anamorphic_size2(ref sourceGeometry, ref uiGeometry, ref result);\r
 \r
-            outputWidth = result.width;\r
-            outputHeight = result.height;\r
-            outputParWidth = result.par.den;\r
-            outputParHeight = result.par.num;\r
+            int outputWidth = result.width;\r
+            int outputHeight = result.height;\r
+            int outputParWidth = result.par.num;\r
+            int outputParHeight = result.par.den;\r
             Debug.WriteLine("hb_set_anamorphic_size2: {0}x{1}", outputWidth, outputHeight);\r
             return new AnamorphicResult { OutputWidth = outputWidth, OutputHeight = outputHeight, OutputParWidth = outputParWidth, OutputParHeight = outputParHeight };\r
         }\r