From 78052b50b43c2cc3dea5690b95ad560a5ef5189f Mon Sep 17 00:00:00 2001 From: sr55 Date: Thu, 1 Mar 2012 19:19:23 +0000 Subject: WinGui: Another attempt to fix the SampleRate culture bug. Missed a few spots in the last checkin. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4480 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- win/CS/Controls/AudioPanel.cs | 5 +++-- win/CS/HandBrake.ApplicationServices/Model/Encoding/AudioTrack.cs | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'win/CS') diff --git a/win/CS/Controls/AudioPanel.cs b/win/CS/Controls/AudioPanel.cs index 2218bcbe9..80d26f46c 100644 --- a/win/CS/Controls/AudioPanel.cs +++ b/win/CS/Controls/AudioPanel.cs @@ -12,6 +12,7 @@ namespace Handbrake.Controls using System.Collections.Specialized; using System.ComponentModel; using System.Drawing; + using System.Globalization; using System.Linq; using System.Windows.Forms; @@ -366,7 +367,7 @@ namespace Handbrake.Controls case "drp_audioSample": double samplerate; - double.TryParse(drp_audioSample.Text, out samplerate); + double.TryParse(drp_audioSample.Text, NumberStyles.Any, CultureInfo.InvariantCulture, out samplerate); track.SampleRate = samplerate; break; case "drp_audioBitrate": @@ -443,7 +444,7 @@ namespace Handbrake.Controls double samplerate; int.TryParse(drp_audioBitrate.Text, out bitrate); - double.TryParse(drp_audioSample.Text, out samplerate); + double.TryParse(drp_audioSample.Text, NumberStyles.Any, CultureInfo.InvariantCulture, out samplerate); // Create the Model AudioTrack track = new AudioTrack diff --git a/win/CS/HandBrake.ApplicationServices/Model/Encoding/AudioTrack.cs b/win/CS/HandBrake.ApplicationServices/Model/Encoding/AudioTrack.cs index 4d05591c5..174273e37 100644 --- a/win/CS/HandBrake.ApplicationServices/Model/Encoding/AudioTrack.cs +++ b/win/CS/HandBrake.ApplicationServices/Model/Encoding/AudioTrack.cs @@ -11,6 +11,7 @@ namespace HandBrake.ApplicationServices.Model.Encoding { using System; using System.ComponentModel; + using System.Globalization; using HandBrake.ApplicationServices.Functions; using HandBrake.ApplicationServices.Parsing; @@ -260,7 +261,7 @@ namespace HandBrake.ApplicationServices.Model.Encoding { get { - return this.SampleRate == 0 ? "Auto" : this.SampleRate.ToString(); + return this.SampleRate == 0 ? "Auto" : this.SampleRate.ToString(CultureInfo.InvariantCulture); } } -- cgit v1.2.3