summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF/Services/Encode
diff options
context:
space:
mode:
authorsr55 <[email protected]>2016-04-12 19:04:11 +0100
committersr55 <[email protected]>2016-04-12 19:04:11 +0100
commit8be786a08e1368e7420a13b6f8ca99e560f287ff (patch)
treef9e95f0fd3d314a6138951f970134aa4c229fd42 /win/CS/HandBrakeWPF/Services/Encode
parent697553a2f127e8c76d4dbf94fef91d81480869a4 (diff)
WinGui: Handle null mixdowns properly. Fixes #152
Diffstat (limited to 'win/CS/HandBrakeWPF/Services/Encode')
-rw-r--r--win/CS/HandBrakeWPF/Services/Encode/Factories/EncodeFactory.cs3
-rw-r--r--win/CS/HandBrakeWPF/Services/Encode/Model/Models/AudioTrack.cs6
2 files changed, 4 insertions, 5 deletions
diff --git a/win/CS/HandBrakeWPF/Services/Encode/Factories/EncodeFactory.cs b/win/CS/HandBrakeWPF/Services/Encode/Factories/EncodeFactory.cs
index ea90a50f3..0f9aa02fd 100644
--- a/win/CS/HandBrakeWPF/Services/Encode/Factories/EncodeFactory.cs
+++ b/win/CS/HandBrakeWPF/Services/Encode/Factories/EncodeFactory.cs
@@ -340,7 +340,6 @@ namespace HandBrakeWPF.Services.Encode.Factories
Validate.NotNull(encoder, "Unrecognized audio encoder:" + item.Encoder);
HBMixdown mixdown = HandBrakeEncoderHelpers.GetMixdown(item.MixDown);
- Validate.NotNull(mixdown, "Unrecognized audio mixdown:" + item.MixDown);
HBRate sampleRate = HandBrakeEncoderHelpers.AudioSampleRates.FirstOrDefault(s => s.Name == item.SampleRate.ToString(CultureInfo.InvariantCulture));
@@ -350,7 +349,7 @@ namespace HandBrakeWPF.Services.Encode.Factories
DRC = item.DRC,
Encoder = encoder.Id,
Gain = item.Gain,
- Mixdown = mixdown.Id,
+ Mixdown = mixdown != null ? mixdown.Id : -1,
NormalizeMixLevel = false,
Samplerate = sampleRate != null ? sampleRate.Rate : 0,
Name = item.TrackName,
diff --git a/win/CS/HandBrakeWPF/Services/Encode/Model/Models/AudioTrack.cs b/win/CS/HandBrakeWPF/Services/Encode/Model/Models/AudioTrack.cs
index 3156d5a83..43138481a 100644
--- a/win/CS/HandBrakeWPF/Services/Encode/Model/Models/AudioTrack.cs
+++ b/win/CS/HandBrakeWPF/Services/Encode/Model/Models/AudioTrack.cs
@@ -160,7 +160,7 @@ namespace HandBrakeWPF.Services.Encode.Model.Models
/// <summary>
/// Gets or sets Audio Encoder
/// </summary>
- public HandBrakeWPF.Services.Encode.Model.Models.AudioEncoder Encoder
+ public AudioEncoder Encoder
{
get
{
@@ -214,7 +214,7 @@ namespace HandBrakeWPF.Services.Encode.Model.Models
/// <summary>
/// Gets or sets the encoder rate type.
/// </summary>
- public HandBrakeWPF.Services.Encode.Model.Models.AudioEncoderRateType EncoderRateType
+ public AudioEncoderRateType EncoderRateType
{
get
{
@@ -435,7 +435,7 @@ namespace HandBrakeWPF.Services.Encode.Model.Models
/// Gets the audio encoder rate types.
/// </summary>
[JsonIgnore]
- public IEnumerable<HandBrakeWPF.Services.Encode.Model.Models.AudioEncoderRateType> AudioEncoderRateTypes
+ public IEnumerable<AudioEncoderRateType> AudioEncoderRateTypes
{
get
{