summaryrefslogtreecommitdiffstats
path: root/macosx/HBVideoController.m
diff options
context:
space:
mode:
authorDamiano Galassi <[email protected]>2019-01-05 09:53:16 +0100
committerDamiano Galassi <[email protected]>2019-01-05 09:53:16 +0100
commitc1162554b4fa4b9b0b1676a70f5c64c9b3bc6553 (patch)
tree48b131c5f2310e1dca7180b6049e2057d31103cb /macosx/HBVideoController.m
parent92e8e81de2d5c5fe29e30d7d2004507a9811cba8 (diff)
MacGui: try to fix an hang on Sierra.
Diffstat (limited to 'macosx/HBVideoController.m')
-rw-r--r--macosx/HBVideoController.m9
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.