summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authorsr55 <[email protected]>2012-05-05 21:07:17 +0000
committersr55 <[email protected]>2012-05-05 21:07:17 +0000
commit997fd01ed69f1505880ff9913e176e7012ab8c0a (patch)
treef5f01e5e04f888433d7aef5b7e6f404b51943932 /win
parent30d9ab93d655465ddc78cfc7ca45355281a2f411 (diff)
WinGui: Fix an issue importing SRT subs.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4644 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win')
-rw-r--r--win/CS/Controls/Subtitles.cs10
1 files changed, 9 insertions, 1 deletions
diff --git a/win/CS/Controls/Subtitles.cs b/win/CS/Controls/Subtitles.cs
index 88e97b7fb..a31c941b7 100644
--- a/win/CS/Controls/Subtitles.cs
+++ b/win/CS/Controls/Subtitles.cs
@@ -417,7 +417,15 @@ namespace Handbrake.Controls
SrtFileName = srtFile
};
- track.SubtitleType = ((Subtitle)drp_subtitleTracks.SelectedItem).SubtitleType;
+ Subtitle subtitle = drp_subtitleTracks.SelectedItem as Subtitle;
+ if (subtitle != null)
+ {
+ track.SubtitleType = ((Subtitle)drp_subtitleTracks.SelectedItem).SubtitleType;
+ }
+ else if (drp_subtitleTracks.SelectedItem != null && drp_subtitleTracks.SelectedItem.ToString().Contains(".srt"))
+ {
+ track.SubtitleType = SubtitleType.SRT;
+ }
if (currentOutputExtension.Equals("mp4", StringComparison.InvariantCultureIgnoreCase) ||
currentOutputExtension.Equals("m4v", StringComparison.CurrentCultureIgnoreCase))