]> granicus.if.org Git - handbrake/commitdiff
WinGui: Another attempt to fix the SampleRate culture bug. Missed a few spots in...
authorsr55 <sr55.hb@outlook.com>
Thu, 1 Mar 2012 19:19:23 +0000 (19:19 +0000)
committersr55 <sr55.hb@outlook.com>
Thu, 1 Mar 2012 19:19:23 +0000 (19:19 +0000)
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4480 b64f7644-9d1e-0410-96f1-a4d463321fa5

win/CS/Controls/AudioPanel.cs
win/CS/HandBrake.ApplicationServices/Model/Encoding/AudioTrack.cs

index 2218bcbe9e04343eb373f7fcc2beb975f710696b..80d26f46c74bb0f93d65cf1295fb0ea13e0392e7 100644 (file)
@@ -12,6 +12,7 @@ namespace Handbrake.Controls
     using System.Collections.Specialized;\r
     using System.ComponentModel;\r
     using System.Drawing;\r
+    using System.Globalization;\r
     using System.Linq;\r
     using System.Windows.Forms;\r
 \r
@@ -366,7 +367,7 @@ namespace Handbrake.Controls
                 case "drp_audioSample":\r
 \r
                     double samplerate;\r
-                    double.TryParse(drp_audioSample.Text, out samplerate);\r
+                    double.TryParse(drp_audioSample.Text, NumberStyles.Any, CultureInfo.InvariantCulture, out samplerate);\r
                     track.SampleRate = samplerate;\r
                     break;\r
                 case "drp_audioBitrate":\r
@@ -443,7 +444,7 @@ namespace Handbrake.Controls
             double samplerate;\r
 \r
             int.TryParse(drp_audioBitrate.Text, out bitrate);\r
-            double.TryParse(drp_audioSample.Text, out samplerate);\r
+            double.TryParse(drp_audioSample.Text, NumberStyles.Any, CultureInfo.InvariantCulture, out samplerate);\r
 \r
             // Create the Model\r
             AudioTrack track = new AudioTrack\r
index 4d05591c5c8bf26e53fa7e070f5fdd0b96f562e3..174273e370748d0bbda57cbfff8ad87767fc782f 100644 (file)
@@ -11,6 +11,7 @@ namespace HandBrake.ApplicationServices.Model.Encoding
 {\r
     using System;\r
     using System.ComponentModel;\r
+    using System.Globalization;\r
 \r
     using HandBrake.ApplicationServices.Functions;\r
     using HandBrake.ApplicationServices.Parsing;\r
@@ -260,7 +261,7 @@ namespace HandBrake.ApplicationServices.Model.Encoding
         {\r
             get\r
             {\r
-                return this.SampleRate == 0 ? "Auto" : this.SampleRate.ToString();\r
+                return this.SampleRate == 0 ? "Auto" : this.SampleRate.ToString(CultureInfo.InvariantCulture);\r
             }\r
         }\r
 \r