summaryrefslogtreecommitdiffstats
path: root/win/C#/Parsing
diff options
context:
space:
mode:
authorsr55 <[email protected]>2009-07-31 15:50:17 +0000
committersr55 <[email protected]>2009-07-31 15:50:17 +0000
commit6051aa0f78e07a069ea44230a72d2e765a1893ba (patch)
tree9732ceceb0cf76eafa2205e4154a8afb398ff16f /win/C#/Parsing
parentc128a2446a8822918dcff743647a4645fe8c24a6 (diff)
WinGui:
- Fixed and issue during scan where missing audio track information would cause the log parser to throw an exception. - Added support for "Growl for Windows" http://growlforwindows.com/gfw/ - Thanks to bdunnington git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2739 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/C#/Parsing')
-rw-r--r--win/C#/Parsing/AudioTrack.cs6
1 files changed, 4 insertions, 2 deletions
diff --git a/win/C#/Parsing/AudioTrack.cs b/win/C#/Parsing/AudioTrack.cs
index c4e1bbc22..56a35194b 100644
--- a/win/C#/Parsing/AudioTrack.cs
+++ b/win/C#/Parsing/AudioTrack.cs
@@ -99,6 +99,8 @@ namespace Handbrake.Parsing
Match bitrate = Regex.Match(audio_track, @"([0-9]*)bps");
string subformat = m.Groups[4].Value.Trim().Contains("iso639") ? null : m.Groups[4].Value;
+ string samplerateVal = samplerate.Success ? samplerate.Groups[0].Value.Replace("Hz", "").Trim() : "0";
+ string bitrateVal = bitrate.Success ? bitrate.Groups[0].Value.Replace("bps", "").Trim() : "0";
if (track.Success)
{
@@ -108,8 +110,8 @@ namespace Handbrake.Parsing
m_language = track.Groups[2].Value,
m_format = m.Groups[3].Value,
m_subFormat = subformat,
- m_frequency = int.Parse(samplerate.Groups[0].Value.Replace("Hz","").Trim()),
- m_bitrate = int.Parse(bitrate.Groups[0].Value.Replace("bps","").Trim()),
+ m_frequency = int.Parse(samplerateVal),
+ m_bitrate = int.Parse(bitrateVal),
m_iso639_2 = iso639_2.Value.Replace("iso639-2: ", "").Replace(")", "")
};
return thisTrack;