diff options
author | sr55 <[email protected]> | 2015-01-22 19:39:14 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2015-01-22 19:39:14 +0000 |
commit | 9da41cd7b44ff14a968e656b55a996bb035053f3 (patch) | |
tree | 7efb395342dedaef12a80006fc1da28bf1a8655e /win/CS/HandBrake.Interop | |
parent | 209c9273e7af434cc2fbae0c0b3f6df4915deea3 (diff) |
WinGui: Fix subtitle track index. Made both Audio and Subtitle tracks 0 based.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6792 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrake.Interop')
-rw-r--r-- | win/CS/HandBrake.Interop/HandBrakeInterop/Json/Factories/EncodeFactory.cs | 3 | ||||
-rw-r--r-- | win/CS/HandBrake.Interop/HandBrakeInterop/Json/Factories/ScanFactory.cs | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/Json/Factories/EncodeFactory.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/Json/Factories/EncodeFactory.cs index 2ddc5a6fc..3be6387ee 100644 --- a/win/CS/HandBrake.Interop/HandBrakeInterop/Json/Factories/EncodeFactory.cs +++ b/win/CS/HandBrake.Interop/HandBrakeInterop/Json/Factories/EncodeFactory.cs @@ -200,7 +200,8 @@ namespace HandBrake.Interop.Json.Factories }
else
{
- SubtitleList track = new SubtitleList { Burn = item.BurnedIn, Default = item.Default, Force = item.Forced, ID = item.TrackNumber, Track = item.TrackNumber };
+ // Note, Subtitle tracks are a 0 based index. So Subtitle 1 == index 0
+ SubtitleList track = new SubtitleList { Burn = item.BurnedIn, Default = item.Default, Force = item.Forced, ID = item.TrackNumber, Track = (item.TrackNumber) };
subtitle.SubtitleList.Add(track);
}
}
diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/Json/Factories/ScanFactory.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/Json/Factories/ScanFactory.cs index df2e4918c..2cee8252b 100644 --- a/win/CS/HandBrake.Interop/HandBrakeInterop/Json/Factories/ScanFactory.cs +++ b/win/CS/HandBrake.Interop/HandBrakeInterop/Json/Factories/ScanFactory.cs @@ -133,7 +133,7 @@ namespace HandBrake.Interop.Json.Factories {
List<Subtitle> subtiles = new List<Subtitle>();
- int currentSubtitleTrack = 1;
+ int currentSubtitleTrack = 0;
foreach (SubtitleList subtitle in subtitles)
{
Subtitle newSubtitle = new Subtitle
@@ -166,7 +166,7 @@ namespace HandBrake.Interop.Json.Factories {
List<AudioTrack> tracks = new List<AudioTrack>();
- int currentAudioTrack = 1;
+ int currentAudioTrack = 0;
foreach (AudioList track in audioTracks)
{
AudioTrack newAudio = new AudioTrack
|