From: van Date: Sat, 16 May 2009 07:06:38 +0000 (+0000) Subject: Remove some noise from the log: Only announce chapters when we're reading, not while... X-Git-Tag: 0.9.4~541 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e2b8e7d4baabc93d6c6fae51d9578f630016bf02;p=handbrake Remove some noise from the log: Only announce chapters when we're reading, not while we're getting previews and get rid of a spurious chapter annoucement in sync (video decoders announce chapters since that's where they first get put in the output data stream). git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2421 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- diff --git a/libhb/decmpeg2.c b/libhb/decmpeg2.c index 6340ca61b..b719370e8 100644 --- a/libhb/decmpeg2.c +++ b/libhb/decmpeg2.c @@ -618,11 +618,15 @@ static int decmpeg2Work( hb_work_object_t * w, hb_buffer_t ** buf_in, pv->libmpeg2->title = w->title; } - // The reader found a chapter break, consume it completely, and remove it from the - // stream. We need to shift it. + // The reader found a chapter break. Remove it from the input + // stream. If we're reading (as opposed to scanning) start looking + // for the next GOP start since that's where the chapter begins. if( (*buf_in)->new_chap ) { - pv->libmpeg2->look_for_break = (*buf_in)->new_chap; + if ( pv->libmpeg2->job ) + { + pv->libmpeg2->look_for_break = (*buf_in)->new_chap; + } (*buf_in)->new_chap = 0; } diff --git a/libhb/sync.c b/libhb/sync.c index eee4708f5..1001ed50c 100644 --- a/libhb/sync.c +++ b/libhb/sync.c @@ -360,10 +360,6 @@ static void SyncVideo( hb_work_object_t * w ) } } - if( cur->new_chap ) { - hb_log("sync got new chapter %d", cur->new_chap ); - } - /* * since the first frame is always 0 and the upstream reader code * is taking care of adjusting for pts discontinuities, we just have