diff options
author | sr55 <[email protected]> | 2019-07-01 18:19:28 +0100 |
---|---|---|
committer | sr55 <[email protected]> | 2019-07-01 18:19:28 +0100 |
commit | 0d3489f51c25b746bc42e38af38105377f6ff4b0 (patch) | |
tree | a3717f3633e86582c179c6df5c5ea5adcf054ead /win/CS/HandBrakeWPF/ViewModels | |
parent | 3ae33f0ea95a681df29a5ab6e8c0f3507298e863 (diff) |
WinGui: Fix an issue where Fast Decode appeared not to save as part of presets correctly for x265. Fixes #2174
Diffstat (limited to 'win/CS/HandBrakeWPF/ViewModels')
-rw-r--r-- | win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs index ce3523573..9edeaa471 100644 --- a/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs @@ -951,9 +951,17 @@ namespace HandBrakeWPF.ViewModels this.VideoLevel = preset.Task.VideoLevel != null ? preset.Task.VideoLevel.Clone() : this.VideoLevels.FirstOrDefault();
this.VideoProfile = preset.Task.VideoProfile != null ? preset.Task.VideoProfile.Clone() : this.VideoProfiles.FirstOrDefault();
this.VideoPresetValue = preset.Task.VideoPreset != null ? this.VideoPresets.IndexOf(preset.Task.VideoPreset) : 0;
- this.FastDecode = preset.Task.VideoTunes != null && preset.Task.VideoTunes.Contains(VideoTune.FastDecode);
- this.VideoTune = (preset.Task.VideoTunes != null && preset.Task.VideoTunes.Any() ? preset.Task.VideoTunes.FirstOrDefault(t => !Equals(t, VideoTune.FastDecode)) : this.VideoTunes.FirstOrDefault())
- ?? VideoTune.None;
+
+ if (preset.Task.VideoEncoder == VideoEncoder.X265 || preset.Task.VideoEncoder == VideoEncoder.X265_10 || preset.Task.VideoEncoder == VideoEncoder.X265_12)
+ {
+ this.VideoTune = (preset.Task.VideoTunes != null && preset.Task.VideoTunes.Any() ? preset.Task.VideoTunes.FirstOrDefault() : this.VideoTunes.FirstOrDefault()) ?? VideoTune.None;
+ }
+ else
+ {
+ this.FastDecode = preset.Task.VideoTunes != null && preset.Task.VideoTunes.Contains(VideoTune.FastDecode);
+ this.VideoTune = (preset.Task.VideoTunes != null && preset.Task.VideoTunes.Any() ? preset.Task.VideoTunes.FirstOrDefault(t => !Equals(t, VideoTune.FastDecode)) : this.VideoTunes.FirstOrDefault())
+ ?? VideoTune.None;
+ }
}
}
|