summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvan <[email protected]>2008-01-06 23:07:01 +0000
committervan <[email protected]>2008-01-06 23:07:01 +0000
commit8c6506d486f6f8c0a9df883e13c9dc2509ed83ba (patch)
treed890db3ea6caae824627d346dd6ecce4becf0d7a
parentad7669eccaabc7bb8e72afc3e60b39f75f88efbf (diff)
fix for duplicate chapters when encoding with ffmpeg.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1169 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r--libhb/work.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/libhb/work.c b/libhb/work.c
index 09ebf7ae8..1ddea78f0 100644
--- a/libhb/work.c
+++ b/libhb/work.c
@@ -762,10 +762,14 @@ static void work_loop( void * _w )
w->work( w, &buf_in, &buf_out );
- // Propogate any chapter breaks for the worker
- if( buf_in && buf_out && buf_in->new_chap )
+ // Propagate any chapter breaks for the worker if and only if the
+ // output frame has the same time stamp as the input frame (any
+ // worker that delays frames has to propagate the chapter marks itself
+ // and workers that move chapter marks to a different time should set
+ // 'buf_in' to NULL so that this code won't generate spurious duplicates.)
+ if( buf_in && buf_out && buf_in->new_chap && buf_in->start == buf_out->start)
{
- hb_log("WORK: Copying Chapter Break");
+ hb_log("work %s: Copying Chapter Break @ %lld", w->name, buf_in->start);
buf_out->new_chap = 1;
}