summaryrefslogtreecommitdiffstats
path: root/macosx/HBTitle.m
diff options
context:
space:
mode:
Diffstat (limited to 'macosx/HBTitle.m')
-rw-r--r--macosx/HBTitle.m4
1 files changed, 3 insertions, 1 deletions
diff --git a/macosx/HBTitle.m b/macosx/HBTitle.m
index 3a6bc134b..1e5e8654e 100644
--- a/macosx/HBTitle.m
+++ b/macosx/HBTitle.m
@@ -231,7 +231,7 @@ extern NSString *keySubTrackType;
if (!_chapters)
{
NSMutableArray<HBChapter *> *chapters = [NSMutableArray array];
-
+ uint64_t currentTime = 0;
for (int i = 0; i < hb_list_count(self.hb_title->list_chapter); i++)
{
hb_chapter_t *chapter = hb_list_item(self.hb_title->list_chapter, i);
@@ -250,7 +250,9 @@ extern NSString *keySubTrackType;
[chapters addObject:[[HBChapter alloc] initWithTitle:title
index:i + 1
+ timestamp:currentTime
duration:chapter->duration]];
+ currentTime += chapter->duration;
}
}