summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
Diffstat (limited to 'win')
-rw-r--r--win/CS/HandBrake.ApplicationServices/Utilities/PlistUtility.cs4
-rw-r--r--win/CS/HandBrakeWPF/Helpers/PictureSize.cs4
2 files changed, 4 insertions, 4 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Utilities/PlistUtility.cs b/win/CS/HandBrake.ApplicationServices/Utilities/PlistUtility.cs
index 9f3ba9991..1b01669c0 100644
--- a/win/CS/HandBrake.ApplicationServices/Utilities/PlistUtility.cs
+++ b/win/CS/HandBrake.ApplicationServices/Utilities/PlistUtility.cs
@@ -167,7 +167,7 @@ namespace HandBrake.ApplicationServices.Utilities
AddEncodeElement(xmlWriter, "PictureDetelecineCustom", "string", parsed.Detelecine == Detelecine.Custom ? parsed.CustomDecomb : string.Empty);
// Picture Settings
- AddEncodeElement(xmlWriter, "PictureHeight", "integer", parsed.Height.ToString());
+ AddEncodeElement(xmlWriter, "PictureHeight", "integer", parsed.MaxHeight.HasValue ? parsed.MaxHeight.Value.ToString() : parsed.Height.HasValue ? parsed.Height.Value.ToString() : "0");
AddEncodeElement(xmlWriter, "PictureKeepRatio", "integer", parsed.KeepDisplayAspect ? "1" : "0");
AddEncodeElement(xmlWriter, "PictureModulus", "integer", parsed.Modulus.ToString());
AddEncodeElement(xmlWriter, "PicturePAR", "integer", ((int)parsed.Anamorphic).ToString());
@@ -175,7 +175,7 @@ namespace HandBrake.ApplicationServices.Utilities
AddEncodeElement(xmlWriter, "PictureRightCrop", "integer", parsed.Cropping.Right.ToString());
AddEncodeElement(xmlWriter, "PictureTopCrop", "integer", parsed.Cropping.Top.ToString());
AddEncodeElement(xmlWriter, "PictureBottomCrop", "integer", parsed.Cropping.Bottom.ToString());
- AddEncodeElement(xmlWriter, "PictureWidth", "integer", parsed.Width.ToString());
+ AddEncodeElement(xmlWriter, "PictureWidth", "integer", parsed.MaxWidth.HasValue ? parsed.MaxWidth.Value.ToString() : parsed.Width.HasValue ? parsed.Width.Value.ToString() : "0");
// Preset Information
AddEncodeElement(xmlWriter, "PresetBuildNumber", "string", build);
diff --git a/win/CS/HandBrakeWPF/Helpers/PictureSize.cs b/win/CS/HandBrakeWPF/Helpers/PictureSize.cs
index f790c5a15..9e268b76c 100644
--- a/win/CS/HandBrakeWPF/Helpers/PictureSize.cs
+++ b/win/CS/HandBrakeWPF/Helpers/PictureSize.cs
@@ -212,8 +212,8 @@ namespace HandBrakeWPF.Helpers
outputWidth = result.width;
outputHeight = result.height;
- outputParWidth = result.par.den;
- outputParHeight = result.par.num;
+ outputParWidth = result.par.num;
+ 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 };
}