From c98c0a9cca5953e12d17d17f8c1ea6afc55b4386 Mon Sep 17 00:00:00 2001 From: sr55 Date: Fri, 26 Dec 2014 22:00:54 +0000 Subject: [Merge] Picture Size and PList Import bug fixes git-svn-id: svn://svn.handbrake.fr/HandBrake/branches/0.10.x@6653 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- win/CS/HandBrake.ApplicationServices/Utilities/PlistUtility.cs | 4 ++-- win/CS/HandBrakeWPF/Helpers/PictureSize.cs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'win') 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 }; } -- cgit v1.2.3