summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authorsr55 <[email protected]>2020-05-03 18:11:12 +0100
committersr55 <[email protected]>2020-05-03 18:11:52 +0100
commit0e24aba0c4c46c34d15289b21582cf10251739b0 (patch)
tree8560aba9b703ee12fea23293ca1b2a7d8671052f /win
parent4c0b1a2a8b69bac7a66eda561f47c506f4ab83cd (diff)
WinGui: Couple if minor bug fixes.
- Fixed an issue with the Audio Defaults when switching to WebM and back. (#2794) - Fixed an issue with Preset disabling code. - Fixed Clear Competed Queue Option (#2814)
Diffstat (limited to 'win')
-rw-r--r--win/CS/HandBrakeWPF/Services/Presets/PresetService.cs2
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/AudioDefaultsViewModel.cs24
2 files changed, 25 insertions, 1 deletions
diff --git a/win/CS/HandBrakeWPF/Services/Presets/PresetService.cs b/win/CS/HandBrakeWPF/Services/Presets/PresetService.cs
index 0879c67d8..9ee511ca8 100644
--- a/win/CS/HandBrakeWPF/Services/Presets/PresetService.cs
+++ b/win/CS/HandBrakeWPF/Services/Presets/PresetService.cs
@@ -490,6 +490,7 @@ namespace HandBrakeWPF.Services.Presets
preset.IsBuildIn = true;
preset.Category = category.PresetName;
preset.Task.AllowedPassthruOptions = new AllowedPassthru(true); // We don't want to override the built-in preset
+ preset.IsPresetDisabled = this.IsPresetDisabled(preset);
this.Add(preset, true);
}
@@ -776,6 +777,7 @@ namespace HandBrakeWPF.Services.Presets
Preset preset = JsonPresetFactory.ImportPreset(hbPreset);
preset.Category = UserPresetCatgoryName;
preset.IsBuildIn = hbPreset.Type == 1;
+ preset.IsPresetDisabled = this.IsPresetDisabled(preset);
// IF we are using Source Max, Set the Max Width / Height values.
if (preset.PictureSettingsMode == PresetPictureSettingsMode.SourceMaximum)
diff --git a/win/CS/HandBrakeWPF/ViewModels/AudioDefaultsViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/AudioDefaultsViewModel.cs
index 24f32211a..7ca879cd6 100644
--- a/win/CS/HandBrakeWPF/ViewModels/AudioDefaultsViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/AudioDefaultsViewModel.cs
@@ -515,10 +515,32 @@ namespace HandBrakeWPF.ViewModels
this.NotifyOfPropertyChange(() => this.Task);
if (this.Task.OutputFormat == OutputFormat.Mp4 &&
- (this.AudioEncoderFallback == AudioEncoder.ffflac || this.AudioEncoderFallback == AudioEncoder.ffflac24 || this.AudioEncoderFallback == AudioEncoder.Vorbis))
+ (this.AudioEncoderFallback == AudioEncoder.ffflac || this.AudioEncoderFallback == AudioEncoder.ffflac24 || this.AudioEncoderFallback == AudioEncoder.Vorbis || this.AudioEncoderFallback == AudioEncoder.Opus))
{
this.AudioEncoderFallback = AudioEncoder.ffaac;
}
+
+ if (this.Task.OutputFormat == OutputFormat.WebM &&
+ (this.AudioEncoderFallback != AudioEncoder.Opus && this.AudioEncoderFallback != AudioEncoder.Vorbis))
+ {
+ this.AudioEncoderFallback = AudioEncoder.Vorbis;
+ }
+
+ if (this.Task.OutputFormat == OutputFormat.Mp4)
+ {
+ foreach (AudioBehaviourTrack track in this.BehaviourTracks.Where(track => track.Encoder == AudioEncoder.ffflac || track.Encoder == AudioEncoder.ffflac24 || track.Encoder == AudioEncoder.Opus || track.Encoder == AudioEncoder.Vorbis))
+ {
+ track.Encoder = AudioEncoder.ffaac;
+ }
+ }
+
+ if (this.Task.OutputFormat == OutputFormat.WebM)
+ {
+ foreach (AudioBehaviourTrack track in this.BehaviourTracks.Where(track => track.Encoder != AudioEncoder.Vorbis && track.Encoder != AudioEncoder.Opus))
+ {
+ track.Encoder = AudioEncoder.Vorbis;
+ }
+ }
}
public void LaunchHelp()