summaryrefslogtreecommitdiffstats
path: root/libhb
diff options
context:
space:
mode:
Diffstat (limited to 'libhb')
-rw-r--r--libhb/muxmp4.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/libhb/muxmp4.c b/libhb/muxmp4.c
index 2a39d0542..adbd2c55a 100644
--- a/libhb/muxmp4.c
+++ b/libhb/muxmp4.c
@@ -480,6 +480,13 @@ static int MP4End( hb_mux_object_t * m )
// the rendering offset of the first sample.
MP4AddTrackEdit(m->file, 1, MP4_INVALID_EDIT_ID, MP4GetSampleRenderingOffset(m->file,1,1),
MP4GetTrackDuration(m->file, 1), 0);
+ if ( m->job->chapter_markers )
+ {
+ // apply same edit to chapter track to keep it in sync with video
+ MP4AddTrackEdit(m->file, m->chapter_track, MP4_INVALID_EDIT_ID,
+ MP4GetSampleRenderingOffset(m->file,1,1),
+ MP4GetTrackDuration(m->file, m->chapter_track), 0);
+ }
}
MP4Close( m->file );