OSDN Git Service

WinGui:
authorsr55 <sr55@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Sat, 12 Sep 2009 21:21:07 +0000 (21:21 +0000)
committersr55 <sr55@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Sat, 12 Sep 2009 21:21:07 +0000 (21:21 +0000)
- Fix an issue in QueryParser related to pixelAspectHeight and pixelAspectWidth values not set correctly.

git-svn-id: svn://localhost/HandBrake/trunk@2816 b64f7644-9d1e-0410-96f1-a4d463321fa5

win/C#/Functions/QueryParser.cs

index 87fdfc0..7230ad9 100644 (file)
@@ -240,10 +240,10 @@ namespace Handbrake.Functions
                     thisQuery.displayWidthValue = double.Parse(displayWidth.Groups[0].Value.Replace("--display-width ", ""));\r
 \r
                 if (pixelAspect.Success)\r
-                    thisQuery.pixelAspectWidth = int.Parse(pixelAspect.Groups[0].Value.Replace("--pixel-aspect ", ""));\r
+                    thisQuery.pixelAspectWidth = int.Parse(pixelAspect.Groups[1].Value.Replace("--pixel-aspect ", ""));\r
 \r
-                if (pixelAspect.Success)\r
-                    thisQuery.pixelAspectHeight = int.Parse(pixelAspect.Groups[1].Value.Replace("--pixel-aspect ", ""));\r
+                if (pixelAspect.Success && pixelAspect.Groups.Count >=3)\r
+                    thisQuery.pixelAspectHeight = int.Parse(pixelAspect.Groups[2].Value.Replace("--pixel-aspect ", ""));\r
 \r
                 if (modulus.Success)\r
                     thisQuery.AnamorphicModulus = int.Parse(modulus.Groups[0].Value.Replace("--modulus ", ""));\r