summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authorsr55 <[email protected]>2019-12-14 14:32:44 +0000
committersr55 <[email protected]>2019-12-14 14:32:56 +0000
commitdac28592df9fd16d189d98429014e53e62a3dce2 (patch)
tree92505397927062d636aaf7f47aff978d83f9fb72 /win
parent769a62e6e775b08b9d2a733a7c9561b4f4173816 (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.
Diffstat (limited to 'win')
-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