summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs
diff options
context:
space:
mode:
authorsr55 <[email protected]>2011-04-09 11:35:43 +0000
committersr55 <[email protected]>2011-04-09 11:35:43 +0000
commit9cc5c63d8d1d72240a50dd12f9c5f367b6321983 (patch)
treead85910f18d26b7ea60b6b129db7c8668795a6dc /win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs
parentcd46f30c0cb39596be65ddfb75f9456a00ebf82e (diff)
WinGui:
- Fix a culture issue with user settings (x264) - Made the Preset loader more strict with what settings it can and can't load with regards to video settings. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3916 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs')
-rw-r--r--win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs10
1 files changed, 5 insertions, 5 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs b/win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs
index bd75880b9..87496dfbc 100644
--- a/win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs
+++ b/win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs
@@ -298,26 +298,26 @@ namespace HandBrake.ApplicationServices.Utilities
switch (task.VideoEncodeRateType)
{
- case VideoEncodeRateMode.ConstantQuality:
+ case VideoEncodeRateMode.AverageBitrate:
if (task.VideoBitrate.HasValue)
query += string.Format(" -b {0}", task.VideoBitrate.Value);
break;
- case VideoEncodeRateMode.AverageBitrate:
+ case VideoEncodeRateMode.ConstantQuality:
double value;
switch (task.VideoEncoder)
{
case VideoEncoder.FFMpeg:
- value = 31 - (task.Quality - 1);
+ value = 31 - (task.Quality.Value - 1);
query += string.Format(" -q {0}", value.ToString(new CultureInfo("en-US")));
break;
case VideoEncoder.X264:
CultureInfo culture = CultureInfo.CreateSpecificCulture("en-US");
- value = 51 - (task.Quality * x264CqStep);
+ value = 51 - (task.Quality.Value * x264CqStep);
value = Math.Round(value, 2);
query += string.Format(" -q {0}", value.ToString(culture));
break;
case VideoEncoder.Theora:
- value = task.Quality;
+ value = task.Quality.Value;
query += string.Format(" -q {0}", value.ToString(new CultureInfo("en-US")));
break;
}