diff options
author | Damiano Galassi <[email protected]> | 2019-01-05 09:53:16 +0100 |
---|---|---|
committer | Damiano Galassi <[email protected]> | 2019-01-05 09:53:16 +0100 |
commit | c1162554b4fa4b9b0b1676a70f5c64c9b3bc6553 (patch) | |
tree | 48b131c5f2310e1dca7180b6049e2057d31103cb /macosx/HBVideoController.m | |
parent | 92e8e81de2d5c5fe29e30d7d2004507a9811cba8 (diff) |
MacGui: try to fix an hang on Sierra.
Diffstat (limited to 'macosx/HBVideoController.m')
-rw-r--r-- | macosx/HBVideoController.m | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/macosx/HBVideoController.m b/macosx/HBVideoController.m index 9a99719a5..5eee2a4f8 100644 --- a/macosx/HBVideoController.m +++ b/macosx/HBVideoController.m @@ -196,8 +196,8 @@ static void *HBVideoControllerContext = &HBVideoControllerContext; */ - (void)setupQualitySlider { - int direction; - float minValue, maxValue, granularity; + int direction = 1; + float minValue = 0, maxValue = 0, granularity = 0; [self.video qualityLimitsForEncoder:self.video.encoder low:&minValue high:&maxValue granularity:&granularity direction:&direction]; if (granularity < 1.0f) @@ -209,8 +209,9 @@ static void *HBVideoControllerContext = &HBVideoControllerContext; } fVidQualitySlider.minValue = minValue; fVidQualitySlider.maxValue = maxValue; - [fVidQualitySlider setNumberOfTickMarks:(int)((maxValue - minValue) * - (1.0f / granularity)) + 1]; + + NSInteger numberOfTickMarks = (NSInteger)((maxValue - minValue) * (1.0f / granularity)) + 1; + fVidQualitySlider.numberOfTickMarks = numberOfTickMarks; // Replace the slider transformer with a new one, // configured with the new max/min/direction values. |