summaryrefslogtreecommitdiffstats
path: root/libhb/muxmp4.c
diff options
context:
space:
mode:
authorvan <[email protected]>2008-01-06 23:01:44 +0000
committervan <[email protected]>2008-01-06 23:01:44 +0000
commitad7669eccaabc7bb8e72afc3e60b39f75f88efbf (patch)
tree1f94f65f2f60ac7d57ab93ae65f80f2a8a8b74b3 /libhb/muxmp4.c
parentf1c3f6d98e030b178c848cc93220db10055ea91a (diff)
Apply same edit to chapter track as to video track so chapters will stay in
sync with the video (otherwise they end up 2-4 frames late). git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1168 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/muxmp4.c')
-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 );