summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libhb/decmpeg2.c10
-rw-r--r--libhb/sync.c4
2 files changed, 7 insertions, 7 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;
}
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