diff options
-rw-r--r-- | win/C#/Parsing/AudioTrack.cs | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/win/C#/Parsing/AudioTrack.cs b/win/C#/Parsing/AudioTrack.cs index e41cae281..129ae78a7 100644 --- a/win/C#/Parsing/AudioTrack.cs +++ b/win/C#/Parsing/AudioTrack.cs @@ -99,7 +99,9 @@ namespace Handbrake.Parsing public static AudioTrack Parse(StringReader output)
{
- Match m = Regex.Match(output.ReadLine(), @"^ \+ ([0-9]*), ([A-Za-z0-9]*) \((.*)\) \((.*)\), ([0-9]*)Hz, ([0-9]*)bps");
+ String audio_track= output.ReadLine();
+ Match m = Regex.Match(audio_track, @"^ \+ ([0-9]*), ([A-Za-z0-9]*) \((.*)\) \((.*)\), ([0-9]*)Hz, ([0-9]*)bps");
+ Match y = Regex.Match(audio_track, @"^ \+ ([0-9]*), ([A-Za-z0-9]*) \((.*)\)");
if (m.Success)
{
AudioTrack thisTrack = new AudioTrack();
@@ -111,6 +113,14 @@ namespace Handbrake.Parsing thisTrack.m_bitrate = int.Parse(m.Groups[6].Value.Trim().ToString());
return thisTrack;
}
+ else if (y.Success)
+ {
+ AudioTrack thisTrack = new AudioTrack();
+ thisTrack.m_trackNumber = int.Parse(y.Groups[1].Value.Trim().ToString());
+ thisTrack.m_language = y.Groups[2].Value;
+ thisTrack.m_format = y.Groups[3].Value;
+ return thisTrack;
+ }
else
return null;
}
|