From ad7669eccaabc7bb8e72afc3e60b39f75f88efbf Mon Sep 17 00:00:00 2001 From: van Date: Sun, 6 Jan 2008 23:01:44 +0000 Subject: 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 --- libhb/muxmp4.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'libhb') 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 ); -- cgit v1.2.3