diff options
-rw-r--r-- | libhb/work.c | 10 |
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; } |