summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authorsr55 <[email protected]>2016-01-05 20:13:45 +0000
committersr55 <[email protected]>2016-01-05 20:13:45 +0000
commitee1167ef3a371cf5830504bf52ec94ad55e2fee9 (patch)
tree4bafe2943a4e06e49423044418cbf39d5def1b1e /win
parent0743f850fad4058cb4407b5a22ef82cfbd70d43d (diff)
WinGui: Fix an issue where the framerate shaper wasn't applied when the framerate was same as source.
Diffstat (limited to 'win')
-rw-r--r--win/CS/HandBrakeWPF/Services/Encode/Factories/EncodeFactory.cs12
1 files changed, 5 insertions, 7 deletions
diff --git a/win/CS/HandBrakeWPF/Services/Encode/Factories/EncodeFactory.cs b/win/CS/HandBrakeWPF/Services/Encode/Factories/EncodeFactory.cs
index 80873c510..3415f1ee7 100644
--- a/win/CS/HandBrakeWPF/Services/Encode/Factories/EncodeFactory.cs
+++ b/win/CS/HandBrakeWPF/Services/Encode/Factories/EncodeFactory.cs
@@ -457,25 +457,23 @@ namespace HandBrakeWPF.Services.Encode.Factories
// VFR / CFR
int fm = job.FramerateMode == FramerateMode.CFR ? 1 : job.FramerateMode == FramerateMode.PFR ? 2 : 0;
+ int? num = null, den = null;
if (job.Framerate != null)
{
IntPtr frameratePrt = Marshal.StringToHGlobalAnsi(job.Framerate.Value.ToString(CultureInfo.InvariantCulture));
int vrate = HBFunctions.hb_video_framerate_get_from_name(frameratePrt);
- int? num = null;
- int? den = null;
if (vrate > 0)
{
num = 27000000;
den = vrate;
}
-
- string framerateString = num.HasValue ? string.Format("{0}:{1}:{2}", fm, num, den) : string.Format("{0}", fm); // filter_cfr, filter_vrate.num, filter_vrate.den
-
- Filter framerateShaper = new Filter { ID = (int)hb_filter_ids.HB_FILTER_VFR, Settings = framerateString };
- filter.FilterList.Add(framerateShaper);
}
+ string framerateString = num.HasValue ? string.Format("{0}:{1}:{2}", fm, num, den) : string.Format("{0}", fm); // filter_cfr, filter_vrate.num, filter_vrate.den
+ Filter framerateShaper = new Filter { ID = (int)hb_filter_ids.HB_FILTER_VFR, Settings = framerateString };
+ filter.FilterList.Add(framerateShaper);
+
// Deblock
if (job.Deblock >= 5)
{