summaryrefslogtreecommitdiffstats
path: root/win/CS
diff options
context:
space:
mode:
authorsr55 <[email protected]>2019-12-14 14:32:44 +0000
committersr55 <[email protected]>2019-12-14 14:33:20 +0000
commit9dc7b2023e76eb1f51a5d40b97a784a5c97c859b (patch)
tree2333afe7ff3119d6de3e89b39e4bb6ded8e4a8b9 /win/CS
parent042c1cbec101d6931f2aecff094e855e3b8042c3 (diff)
WinGui: When using QuickSync and defaulting to VFR same as source on encoder change, make sure the UI is correctly updated and actually using VFR mode 0. Fixes #2475
Also fix an issue with the x264 tooltip code sometimes triggering the x264 API call before we've switched to x264 fully. (cherry picked from commit dac28592df9fd16d189d98429014e53e62a3dce2)
Diffstat (limited to 'win/CS')
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs14
1 files changed, 10 insertions, 4 deletions
diff --git a/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs
index f453c3dfb..5170e45c7 100644
--- a/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs
@@ -476,7 +476,7 @@ namespace HandBrakeWPF.ViewModels
}
set
{
- if (value == "Same as source")
+ if (value == "Same as source" || value == null)
{
this.Task.Framerate = null;
this.ShowPeakFramerate = false;
@@ -1215,7 +1215,14 @@ namespace HandBrakeWPF.ViewModels
/// </returns>
private string GetActualx264Query()
{
- if (this.SelectedVideoEncoder != VideoEncoder.X264 && this.SelectedVideoEncoder != VideoEncoder.X264_10)
+ VideoEncoder encoder = this.SelectedVideoEncoder;
+ if (encoder != VideoEncoder.X264 && encoder != VideoEncoder.X264_10)
+ {
+ return string.Empty;
+ }
+
+ HBVideoEncoder hbEncoder = HandBrakeEncoderHelpers.VideoEncoders.FirstOrDefault(s => s.ShortName == EnumHelper<VideoEncoder>.GetShortName(encoder));
+ if (hbEncoder == null || !hbEncoder.Presets.Contains(this.VideoPreset?.ShortName))
{
return string.Empty;
}
@@ -1498,8 +1505,7 @@ namespace HandBrakeWPF.ViewModels
{
this.TwoPass = false;
this.TurboFirstPass = false;
- this.Task.Framerate = null;
- this.NotifyOfPropertyChange(() => this.SelectedFramerate);
+ this.SelectedFramerate = null;
}
if (selectedEncoder == VideoEncoder.NvencH264 || selectedEncoder == VideoEncoder.NvencH265