summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
Diffstat (limited to 'win')
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs2
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs12
2 files changed, 8 insertions, 6 deletions
diff --git a/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs
index 9511de2ae..273a2f6d5 100644
--- a/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs
@@ -1875,7 +1875,7 @@ namespace HandBrakeWPF.ViewModels
userSettingService.SetUserSetting(UserSettingConstants.X264Step, double.Parse(this.SelectedGranulairty, CultureInfo.InvariantCulture));
int value;
- if (int.TryParse(this.MinLength.ToString(), out value))
+ if (int.TryParse(this.MinLength.ToString(CultureInfo.InvariantCulture), out value))
{
this.userSettingService.SetUserSetting(ASUserSettingConstants.MinScanDuration, value);
}
diff --git a/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs
index 888afb132..dba17ea7a 100644
--- a/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs
@@ -15,7 +15,6 @@ namespace HandBrakeWPF.ViewModels
using Caliburn.Micro;
- using HandBrake.ApplicationServices;
using HandBrake.ApplicationServices.Model;
using HandBrake.ApplicationServices.Model.Encoding;
using HandBrake.ApplicationServices.Parsing;
@@ -31,6 +30,12 @@ namespace HandBrakeWPF.ViewModels
public class VideoViewModel : ViewModelBase, IVideoViewModel
{
#region Constants and Fields
+
+ /// <summary>
+ /// Same as source constant.
+ /// </summary>
+ private const string SameAsSource = "Same as source";
+
/// <summary>
/// Backing field for the user setting service.
/// </summary>
@@ -413,10 +418,7 @@ namespace HandBrakeWPF.ViewModels
}
this.SelectedVideoEncoder = preset.Task.VideoEncoder;
- if (preset.Task.Framerate.HasValue)
- {
- this.SelectedFramerate = preset.Task.Framerate.Value.ToString(CultureInfo.InvariantCulture);
- }
+ this.SelectedFramerate = preset.Task.Framerate.HasValue ? preset.Task.Framerate.Value.ToString(CultureInfo.InvariantCulture) : SameAsSource;
this.IsConstantQuantity = preset.Task.VideoEncodeRateType == VideoEncodeRateType.ConstantQuality;