summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF/Services
diff options
context:
space:
mode:
authorsr55 <[email protected]>2018-10-03 21:05:06 +0100
committersr55 <[email protected]>2018-10-03 21:05:06 +0100
commitcee90c5e1f67822eeda314214028e59b4adcfdac (patch)
treed06d314c880d9cc7ca8784b831b49f9ea0395d41 /win/CS/HandBrakeWPF/Services
parented05ae1a789e1f4f8b0580f87c5e9663671e6014 (diff)
WinGui: Fix an issue that might be causing the default sample rate to be selected instead of auto. #1618
Diffstat (limited to 'win/CS/HandBrakeWPF/Services')
-rw-r--r--win/CS/HandBrakeWPF/Services/Presets/Factories/JsonPresetFactory.cs6
-rw-r--r--win/CS/HandBrakeWPF/Services/Presets/PresetService.cs2
2 files changed, 6 insertions, 2 deletions
diff --git a/win/CS/HandBrakeWPF/Services/Presets/Factories/JsonPresetFactory.cs b/win/CS/HandBrakeWPF/Services/Presets/Factories/JsonPresetFactory.cs
index 3f86e1aa5..b36a83951 100644
--- a/win/CS/HandBrakeWPF/Services/Presets/Factories/JsonPresetFactory.cs
+++ b/win/CS/HandBrakeWPF/Services/Presets/Factories/JsonPresetFactory.cs
@@ -403,7 +403,11 @@ namespace HandBrakeWPF.Services.Presets.Factories
// track.AudioNormalizeMixLevel = audioTrack.AudioNormalizeMixLevel;
- if (!string.IsNullOrEmpty(audioTrack.AudioSamplerate) && !"auto".Equals(audioTrack.AudioSamplerate))
+ if ("auto".Equals(audioTrack.AudioSamplerate))
+ {
+ track.SampleRate = 0;
+ }
+ else if (!string.IsNullOrEmpty(audioTrack.AudioSamplerate))
{
double sampleRate = 0;
if (double.TryParse(audioTrack.AudioSamplerate, NumberStyles.Any, CultureInfo.InvariantCulture, out sampleRate))
diff --git a/win/CS/HandBrakeWPF/Services/Presets/PresetService.cs b/win/CS/HandBrakeWPF/Services/Presets/PresetService.cs
index b851d8a7c..8540c4774 100644
--- a/win/CS/HandBrakeWPF/Services/Presets/PresetService.cs
+++ b/win/CS/HandBrakeWPF/Services/Presets/PresetService.cs
@@ -608,7 +608,7 @@ namespace HandBrakeWPF.Services.Presets
#region Private Helpers
/// <summary>
- /// Recover from a courrpted preset file
+ /// Recover from a corrupted preset file
/// Add .old to the current filename, and delete the current file.
/// </summary>
/// <param name="file">