diff options
-rw-r--r-- | win/CS/HandBrake.ApplicationServices/Utilities/InteropModelCreator.cs | 6 | ||||
-rw-r--r-- | win/CS/HandBrake.Interop/HandBrakeInterop/Json/Factories/EncodeFactory.cs | 3 |
2 files changed, 4 insertions, 5 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Utilities/InteropModelCreator.cs b/win/CS/HandBrake.ApplicationServices/Utilities/InteropModelCreator.cs index 37d9499cd..0f2fa8688 100644 --- a/win/CS/HandBrake.ApplicationServices/Utilities/InteropModelCreator.cs +++ b/win/CS/HandBrake.ApplicationServices/Utilities/InteropModelCreator.cs @@ -76,13 +76,13 @@ namespace HandBrake.ApplicationServices.Utilities Drc = track.DRC,
Gain = track.Gain,
Encoder = Converters.GetCliAudioEncoder(track.Encoder),
- InputNumber = track.Track.HasValue ? track.Track.Value : 0,
+ InputNumber = track.Track.HasValue ? track.Track.Value - 1 : 0, // It's 0 based index
Mixdown = Converters.GetCliMixDown(track.MixDown),
SampleRateRaw = GetSampleRateRaw(track.SampleRate),
EncodeRateType = AudioEncodeRateType.Bitrate,
Name = track.TrackName,
- IsPassthru = track.IsPassthru
- };
+ IsPassthru = track.IsPassthru,
+ };
job.AudioEncodings.Add(newTrack);
}
diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/Json/Factories/EncodeFactory.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/Json/Factories/EncodeFactory.cs index 327e5ce9f..2ddc5a6fc 100644 --- a/win/CS/HandBrake.Interop/HandBrakeInterop/Json/Factories/EncodeFactory.cs +++ b/win/CS/HandBrake.Interop/HandBrakeInterop/Json/Factories/EncodeFactory.cs @@ -286,7 +286,6 @@ namespace HandBrake.Interop.Json.Factories audio.CopyMask = (int)NativeConstants.HB_ACODEC_ANY;
audio.AudioList = new List<AudioList>();
- int numTracks = 0;
foreach (AudioEncoding item in job.AudioEncodings)
{
HBAudioEncoder encoder = HandBrakeEncoderHelpers.GetAudioEncoder(item.Encoder);
@@ -297,7 +296,7 @@ namespace HandBrake.Interop.Json.Factories AudioList audioTrack = new AudioList
{
- Track = numTracks++,
+ Track = item.InputNumber,
DRC = item.Drc,
Encoder = encoder.Id,
Gain = item.Gain,
|