OSDN Git Service

Remove some noise from the log: Only announce chapters when we're reading, not while...
authorvan <van@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Sat, 16 May 2009 07:06:38 +0000 (07:06 +0000)
committervan <van@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Sat, 16 May 2009 07:06:38 +0000 (07:06 +0000)
git-svn-id: svn://localhost/HandBrake/trunk@2421 b64f7644-9d1e-0410-96f1-a4d463321fa5

libhb/decmpeg2.c
libhb/sync.c

index 6340ca6..b719370 100644 (file)
@@ -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;
     }
 
index eee4708..1001ed5 100644 (file)
@@ -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