+ if( m->look_for_iframe && ( m->info->display_picture->flags &
+ PIC_MASK_CODING_TYPE ) == PIC_FLAG_CODING_TYPE_I )
+ {
+ // we were waiting for an iframe to insert a chapter mark
+ // and we have one.
+ buf->new_chap = m->look_for_iframe;
+ m->look_for_iframe = 0;
+ const char *chap_name = "";
+ if ( m->job && buf->new_chap > 0 &&
+ hb_list_item( m->job->title->list_chapter,
+ buf->new_chap - 1 ) )
+ {
+ hb_chapter_t * c = hb_list_item( m->job->title->list_chapter,
+ buf->new_chap - 1 );
+ chap_name = c->title;
+ }
+ hb_log( "mpeg2: \"%s\" (%d) at frame %u time %lld",
+ chap_name, buf->new_chap, m->nframes, buf->start );
+ } else if ( m->nframes == 0 && m->job &&
+ hb_list_item( m->job->title->list_chapter,
+ m->job->chapter_start - 1 ) )
+ {
+ hb_chapter_t * c = hb_list_item( m->job->title->list_chapter,
+ m->job->chapter_start - 1 );
+ hb_log( "mpeg2: \"%s\" (%d) at frame %u time %lld", c->title,
+ m->job->chapter_start, m->nframes, buf->start );
+ }
+ ++m->nframes;
+