diff options
Diffstat (limited to 'libhb/decmpeg2.c')
-rw-r--r-- | libhb/decmpeg2.c | 10 |
1 files changed, 7 insertions, 3 deletions
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; } |