From e9fc9ccc1539834a0a51e2d948c6e04cc6ea9b88 Mon Sep 17 00:00:00 2001 From: Damiano Galassi Date: Fri, 11 Nov 2016 10:25:05 +0100 Subject: [PATCH] MacGui: round up HBTitle frames count. --- macosx/HBTitle.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/macosx/HBTitle.m b/macosx/HBTitle.m index 5d87bfaad..66d76efd3 100644 --- a/macosx/HBTitle.m +++ b/macosx/HBTitle.m @@ -116,7 +116,8 @@ extern NSString *keySubTrackType; - (int)frames { - return (int) ((self.hb_title->duration / 90000.) * (self.hb_title->vrate.num / (double)self.hb_title->vrate.den)); + double frames = (double)self.hb_title->duration / 90000.f * self.hb_title->vrate.num / self.hb_title->vrate.den; + return (int)ceil(frames); } - (NSString *)timeCode -- 2.40.0