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;
}
}
}
- 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