summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrake.ApplicationServices
diff options
context:
space:
mode:
Diffstat (limited to 'win/CS/HandBrake.ApplicationServices')
-rw-r--r--win/CS/HandBrake.ApplicationServices/Utilities/EnumHelper.cs5
-rw-r--r--win/CS/HandBrake.ApplicationServices/Utilities/PlistUtility.cs14
2 files changed, 11 insertions, 8 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Utilities/EnumHelper.cs b/win/CS/HandBrake.ApplicationServices/Utilities/EnumHelper.cs
index cc7dfc43e..45988ba60 100644
--- a/win/CS/HandBrake.ApplicationServices/Utilities/EnumHelper.cs
+++ b/win/CS/HandBrake.ApplicationServices/Utilities/EnumHelper.cs
@@ -14,6 +14,7 @@ namespace HandBrake.ApplicationServices.Utilities
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
+ using System.Diagnostics;
using System.Linq;
using System.Reflection;
@@ -91,7 +92,9 @@ namespace HandBrake.ApplicationServices.Utilities
}
}
- throw new ArgumentOutOfRangeException("The Description for the enum was not recognized.");
+ Debug.WriteLine("EnumHelper.GetValue: The Description for the enum was not recognized: " + description);
+
+ return default(T);
}
/// <summary>
diff --git a/win/CS/HandBrake.ApplicationServices/Utilities/PlistUtility.cs b/win/CS/HandBrake.ApplicationServices/Utilities/PlistUtility.cs
index 3ddb1ff51..25c3a1426 100644
--- a/win/CS/HandBrake.ApplicationServices/Utilities/PlistUtility.cs
+++ b/win/CS/HandBrake.ApplicationServices/Utilities/PlistUtility.cs
@@ -276,13 +276,13 @@ namespace HandBrake.ApplicationServices.Utilities
if (parsed.FastDecode)
{
tune = tune == "none" ? "fastdecode" : tune + ",fastdecode";
- }
- AddEncodeElement(xmlWriter, "x264Tune", "string", tune);
- AddEncodeElement(xmlWriter, "x264UseAdvancedOptions", "integer", parsed.ShowAdvancedTab ? "1" : "0");
- AddEncodeElement(xmlWriter, "qsvPreset", "string", parsed.QsvPreset.ToString().ToLower());
-
- int videoQualityType = 0;
- if (parsed.VideoBitrate != null) videoQualityType = 1;
+ }
+ AddEncodeElement(xmlWriter, "x264Tune", "string", tune);
+ AddEncodeElement(xmlWriter, "x264UseAdvancedOptions", "integer", parsed.ShowAdvancedTab ? "1" : "0");
+ AddEncodeElement(xmlWriter, "qsvPreset", "string", parsed.QsvPreset.ToString().ToLower());
+
+ int videoQualityType = 0;
+ if (parsed.VideoBitrate != null) videoQualityType = 1;
else if (parsed.Quality != null) videoQualityType = 2;
AddEncodeElement(xmlWriter, "VideoQualityType", "integer", videoQualityType.ToString());