]> granicus.if.org Git - handbrake/commitdiff
Makes sure chapter markers get applied to the right track, so ReaderFunc() sees them...
authorjbrjake <jb.rubin@gmail.com>
Tue, 24 Jul 2007 16:33:19 +0000 (16:33 +0000)
committerjbrjake <jb.rubin@gmail.com>
Tue, 24 Jul 2007 16:33:19 +0000 (16:33 +0000)
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@727 b64f7644-9d1e-0410-96f1-a4d463321fa5

libhb/demuxmpeg.c

index 5aefc37439a9345919b6ee817bbab057c42deaf8..93b3709c35869b4a4d32e96f3eb37396041443f5 100644 (file)
@@ -112,8 +112,11 @@ int hb_demux_ps( hb_buffer_t * buf_ps, hb_list_t * list_es )
 
         buf_es->id       = id;
         buf_es->start    = pts;
-        buf_es->new_chap = buf_ps->new_chap; // Consume a chapter break, and apply it to the ES.
-        buf_ps->new_chap = 0;
+        if (id == 0xE0) {
+            // Consume a chapter break, and apply it to the ES.
+            buf_es->new_chap = buf_ps->new_chap;
+            buf_ps->new_chap = 0;
+        }
         memcpy( buf_es->data, d + pos, pes_packet_end - pos );
 
         hb_list_add( list_es, buf_es );