summaryrefslogtreecommitdiffstats
path: root/win/C#/HandBrake.ApplicationServices/Parsing/AudioTrack.cs
diff options
context:
space:
mode:
Diffstat (limited to 'win/C#/HandBrake.ApplicationServices/Parsing/AudioTrack.cs')
-rw-r--r--win/C#/HandBrake.ApplicationServices/Parsing/AudioTrack.cs4
1 files changed, 4 insertions, 0 deletions
diff --git a/win/C#/HandBrake.ApplicationServices/Parsing/AudioTrack.cs b/win/C#/HandBrake.ApplicationServices/Parsing/AudioTrack.cs
index 55cf524a5..4eba0b4c1 100644
--- a/win/C#/HandBrake.ApplicationServices/Parsing/AudioTrack.cs
+++ b/win/C#/HandBrake.ApplicationServices/Parsing/AudioTrack.cs
@@ -61,6 +61,10 @@ namespace HandBrake.ApplicationServices.Parsing
public static AudioTrack Parse(StringReader output)
{
string audioTrack = output.ReadLine();
+
+ if (audioTrack == null)
+ return null;
+
Match m = Regex.Match(audioTrack, @"^ \+ ([0-9]*), ([A-Za-z0-9,\s]*) \((.*)\) \((.*)\)");
Match track = Regex.Match(audioTrack, @"^ \+ ([0-9]*), ([A-Za-z0-9,\s]*) \((.*)\)"); // ID and Language
Match iso639_2 = Regex.Match(audioTrack, @"iso639-2: ([a-zA-Z]*)\)");