diff options
author | dynaflash <[email protected]> | 2007-04-25 17:24:58 +0000 |
---|---|---|
committer | dynaflash <[email protected]> | 2007-04-25 17:24:58 +0000 |
commit | cdcdac58032b929a7edea0459047a9cb56da767d (patch) | |
tree | c0aad497331fe94fb7f6b13b9600283f9350cf59 /libhb/sync.c | |
parent | e1f55561971a286170d003d20eff51c9a5563f43 (diff) |
Fix Previous Bad commit for Cyanders Chapter Markers
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@548 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/sync.c')
-rw-r--r-- | libhb/sync.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/libhb/sync.c b/libhb/sync.c index fb5d704ac..6ebbf6e0d 100644 --- a/libhb/sync.c +++ b/libhb/sync.c @@ -244,6 +244,7 @@ static int SyncVideo( hb_work_object_t * w ) hb_buffer_t * cur, * next, * sub = NULL; hb_job_t * job = pv->job; int64_t pts_expected; + int chap_break; if( pv->done ) { @@ -310,8 +311,11 @@ static int SyncVideo( hb_work_object_t * w ) } /* Trash current picture */ + /* Also, make sure we don't trash a chapter break */ + chap_break = cur->new_chap; hb_buffer_close( &cur ); pv->cur = cur = hb_fifo_get( job->fifo_raw ); + cur->new_chap |= chap_break; // Don't stomp existing chapter breaks /* Calculate new offset */ pv->pts_offset_old = pv->pts_offset; @@ -358,8 +362,12 @@ static int SyncVideo( hb_work_object_t * w ) { /* The current frame is too old but the next one matches, let's trash */ + /* Also, make sure we don't trash a chapter break */ + chap_break = cur->new_chap; hb_buffer_close( &cur ); pv->cur = cur = hb_fifo_get( job->fifo_raw ); + cur->new_chap |= chap_break; // Make sure we don't stomp the existing one. + continue; } @@ -377,7 +385,7 @@ static int SyncVideo( hb_work_object_t * w ) buf_tmp = cur; pv->cur = cur = hb_fifo_get( job->fifo_raw ); } - + /* Replace those MPEG-2 dates with our dates */ buf_tmp->start = (uint64_t) pv->count_frames * pv->job->vrate_base / 300; |