for ( i = 0; i < NTAGS; ++i )
{
if ( m->tags[i].cc_buf )
+ {
+ if ( m->tags[i].cc_buf == m->last_cc1_buf )
+ m->last_cc1_buf = NULL;
hb_buffer_close( &m->tags[i].cc_buf );
+ }
+ }
+ if ( m->last_cc1_buf )
+ {
+ hb_buffer_close( &m->last_cc1_buf );
}
free( m );
if ( pv->libmpeg2->last_cc1_buf )
{
cc_send_to_decoder( pv->libmpeg2, pv->libmpeg2->last_cc1_buf );
+ if ( pv->libmpeg2->tags[pv->libmpeg2->cur_tag].cc_buf ==
+ pv->libmpeg2->last_cc1_buf )
+ {
+ pv->libmpeg2->tags[pv->libmpeg2->cur_tag].cc_buf = NULL;
+ }
pv->libmpeg2->last_cc1_buf = NULL;
}
cc_send_to_decoder( pv->libmpeg2, hb_buffer_init( 0 ) );
{
hb_log( "mpeg2 done: %d frames", pv->libmpeg2->nframes );
}
- if ( pv->libmpeg2->last_cc1_buf )
- {
- hb_buffer_close( &pv->libmpeg2->last_cc1_buf );
- }
hb_list_close( &pv->list );
if ( pv->libmpeg2->list_subtitle )
{