diff options
Diffstat (limited to 'macosx')
-rw-r--r-- | macosx/HBRange.m | 2 | ||||
-rw-r--r-- | macosx/HBTitle.m | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/macosx/HBRange.m b/macosx/HBRange.m index b49d5b447..d4e785b30 100644 --- a/macosx/HBRange.m +++ b/macosx/HBRange.m @@ -88,7 +88,7 @@ NSString *HBRangeChangedNotification = @"HBRangeChangedNotification"; else if (self.type == HBRangeTypeFrames) { hb_title_t *title = self.title.hb_title; - int duration = (self.frameStop - self.frameStart) / (title->vrate.num / title->vrate.den); + int duration = (self.frameStop - self.frameStart) / (title->vrate.num / (double)title->vrate.den); return [NSString stringWithFormat: @"%02d:%02d:%02d", duration / 3600, ( duration / 60 ) % 60, duration % 60]; } diff --git a/macosx/HBTitle.m b/macosx/HBTitle.m index be5158327..f2e5b4fb3 100644 --- a/macosx/HBTitle.m +++ b/macosx/HBTitle.m @@ -114,7 +114,7 @@ extern NSString *keySubTrackSrtCharCode; - (int)frames { - return self.duration * (self.hb_title->vrate.num / self.hb_title->vrate.den); + return (self.hb_title->duration / 90000.) * (self.hb_title->vrate.num / (double)self.hb_title->vrate.den); } - (NSString *)timeCode |