From: sr55 Date: Sat, 6 Oct 2018 12:30:46 +0000 (+0100) Subject: WinGui: Fix Mixdown selection when the preset mixdown is not available for a given... X-Git-Tag: 1.2.0~125 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=716e427aabd9be574c1ef5ef3bb100ed741d5c98;p=handbrake WinGui: Fix Mixdown selection when the preset mixdown is not available for a given source. Fixes #1618 --- diff --git a/win/CS/HandBrakeWPF/Services/Encode/Model/Models/AudioTrack.cs b/win/CS/HandBrakeWPF/Services/Encode/Model/Models/AudioTrack.cs index 393b5efc2..cda397929 100644 --- a/win/CS/HandBrakeWPF/Services/Encode/Model/Models/AudioTrack.cs +++ b/win/CS/HandBrakeWPF/Services/Encode/Model/Models/AudioTrack.cs @@ -44,7 +44,7 @@ namespace HandBrakeWPF.Services.Encode.Model.Models private bool isDefault; private IEnumerable bitrates; private IEnumerable encoderQualityValues; - private HandBrakeWPF.Services.Encode.Model.Models.AudioEncoderRateType encoderRateType; + private AudioEncoderRateType encoderRateType; private double? quality; /// @@ -53,7 +53,7 @@ namespace HandBrakeWPF.Services.Encode.Model.Models public AudioTrack() { // Default Values - this.Encoder = HandBrakeWPF.Services.Encode.Model.Models.AudioEncoder.ffaac; + this.Encoder = AudioEncoder.ffaac; this.MixDown = HandBrakeEncoderHelpers.Mixdowns.FirstOrDefault(m => m.ShortName == "dpl2")?.ShortName; this.SampleRate = 48; this.Bitrate = 160; @@ -229,9 +229,9 @@ namespace HandBrakeWPF.Services.Encode.Model.Models this.NotifyOfPropertyChange(() => this.IsBitrateVisible); this.NotifyOfPropertyChange(() => this.IsQualityVisible); this.NotifyOfPropertyChange(() => this.IsRateTypeVisible); - this.NotifyOfPropertyChange(() => this.TrackReference); - this.GetDefaultMixdownIfNull(); + this.NotifyOfPropertyChange(() => this.TrackReference); this.SetupLimits(); + this.GetDefaultMixdownIfNull(); // Refresh the available encoder rate types. this.NotifyOfPropertyChange(() => this.AudioEncoderRateTypes); @@ -580,6 +580,7 @@ namespace HandBrakeWPF.Services.Encode.Model.Models { this.SetupBitrateLimits(); this.SetupQualityCompressionLimits(); + this.GetDefaultMixdownIfNull(); } ///